angular.dart
angular.dart copied to clipboard
When using an NgTwoWay where name matches Component selector
If an NgTwoAttribute matches a component selector you get an error where is will try to set the property to String. For example:
import 'package:angular/application_factory.dart';
import 'package:angular/angular.dart';
class ExampleModule extends Module{
ExampleModule(){
bind(SetupComponent);
bind(SetupViewComponent);
}
}
main(){
var injector = applicationFactory( )
.addModule( new ExampleModule( ) )
.run( );
}
class Setup{
int id;
}
@Component( selector: 'setup', template: '<setupView setup="setup"></setupView>', useShadowDom: false )
class SetupComponent{
Setup setup = new Setup();
}
@Component( selector: 'setupView', template: '{{setup.id}}', useShadowDom: false )
class SetupViewComponent{
@NgTwoWay("setup")
Setup setup;
}