I was about to make a demo application of angular2.0, but it seems that the injections do not work with build 24 and give me an error like
"ORIGINAL ERROR: it is not possible to resolve all parameters for MyAppComponent. Have a valid type or annotation."
prior to build 23 its working fine please help me with a problem
Below is a demo code, I did a few manipulations with the original for training purposes only
import {Component, View, bootstrap, NgFor} from 'angular2/angular2'; module foo{ class FriendsService { names: Array<string>; constructor() { this.names = ["Alice", "Aarav", "Martín", "Shannon", "Ariana","Kai"]; } } @Component({ selector: 'array', injecetables: [FriendsService] }) @View({ template: '<p>My name: {{ myName }}</p><p>Friends:</p><ul><li *ng-for="#name of names">{{ name }}</li></ul>', directives: [NgFor] }) export class arrayComponent { myName: string; names: Array<string>; constructor(friendsService: FriendsService) { this.myName = 'Alice'; this.names = friendsService.names; } } } bootstrap(foo.arrayComponent);
source share