Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

When using an NgTwoWay where name matches Component selector #1689

Open
jrote1 opened this issue Mar 11, 2015 · 0 comments
Open

When using an NgTwoWay where name matches Component selector #1689

jrote1 opened this issue Mar 11, 2015 · 0 comments

Comments

@jrote1
Copy link
Contributor

jrote1 commented Mar 11, 2015

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;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant