dart-archive / angular.dart

Legacy source repository. See github.com/dart-lang/angular
https://webdev.dartlang.org/angular/
1.25k stars 248 forks source link

Annotations on mixin are not detected #1673

Open isoos opened 9 years ago

isoos commented 9 years ago

If I have a class that has a mixin, and the mixin has @NgOneWay annotation on its fields, these annotations are not detected and the fields are not being bound.

cgarciae commented 9 years ago

I have a similar error. I have the classes

class User
{
    @Id() String id;
    @Field() String nombre;
    @Field() String apellido;
    @Field() String email;

    @ReferenceId() List<String> eventos = [];
}

class Password
{
    @Field() String password;
}

class UserSecure extends User with Password
{

}

where @Field() is a Redstone Mapper annotation. It is somehow being eliminated by Angular or Dart2JS, and as a result Redstone Mapper doesn't encode the password. This if fixed by restructuring the code like this

class UserSecure extends User
{
    @Field() String password;
}

However, the mixin had its purpose, no I'll have to change other classes as well.