0
我想实现一个没有TypeScript的Angular 2应用程序,并且我被困在如何引导它(可以找到任何示例)。如何使用vanilla js/es6在Angular 2中使用引导程序?
我的应用程序(不包括自举())的开头为:
export class MyApp {
static get parameters() {
return [[Http], [Platform], [IonicApp]];
}
constructor(http, platform, app) {
}
}
该工程确定。但是,让我们说,我有一个CustomService。我将如何将它注入MyApp?
我试着用:
bootstrap(myApp, [SomeCustomService]);
但控制台日志: 例外:不提供对于HTTP! (MyApp - > Http)
我是否错过了什么?我是否理解了一些概念?
兄弟,哪个文件是你加入这一行 - 引导(对myApp,[SomeCustomService]); ? –