我新的Angular2,我不理解<>語法:<>語法Angular2
實施例1(從https://angular.io/docs/ts/latest/guide/dependency-injection.html):
let mockService = <HeroService> {getHeroes:() => expectedHeroes }
實施例2(從https://angular.io/docs/ts/latest/guide/template-syntax.html)
deleteRequest = new EventEmitter<Hero>();
任何幫助或引用全面的答案表示讚賞。
謝謝,是否還有那個<>語法的用法?你有一個全面的<>語法用法的鏈接嗎?我很驚訝,我沒有找到任何。 – shrimpdrake
我推薦https://basarat.gitbooks.io/typescript/content/docs/types/type-assertion.html和https://www.typescriptlang.org/docs/handbook/generics.html –