Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was 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

Description

@jrote1

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions