javascript - Unexpected directive value 'undefined' on the View of component (angular 2.0) -


i use latest alpha version of angular 2.0, use es5 code it. when add directives view annotation encounter error.

plunkr: http://plnkr.co/edit/ejqmvaidyyppoexr0igf

place.annotations = [     new angular.componentannotation({         selector: 'ph-place',         injectables: [service.places]     }),     new angular.viewannotation({         template: '<ul><li *for="#place of places">{{ place }}</li></ul>',         directives: [angular.for]     }) ]; 

comment github angular 2.0 issue gdi2290

@virtualoverride problem docs on angular.io still outdated. here's example working alpha.25 plnkr.co/edit/ks0sbv?p=preview refactored bit , made helper annotations in utils. added original 1 old if prefer that"

i needed make couple of changes:

main issue, changed injectables appinjector in directive settings, has been changed new alpha version.

new angular.componentannotation({         selector: 'ph-place',         appinjector: [service.places]     }), 

changed ngfor:

 new angular.viewannotation({         template: '<ul><li *ng-for="#place of places">{{ place }}</li></ul>',         directives: [angular.ngfor]     }) 

demo


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -