嘿,我有一個非常小的角(2.1.1)應用程序與模塊和組件。一切工作正常,直到我得到這個錯誤:Angular2應用程序不會工作
error_handler.js:53 TypeError: jit_selectOrCreateRenderHostElement5 is not a function
at _View_AppComponent_Host0.createInternal (/AppModule/AppComponent/host.ngfactory.js:13:16)
at _View_AppComponent_Host0.System.register.context_1.execute.AppView.create (http://localhost:9000/assets/lib/angular__core/src/linker/view.js!transpiled:138:33)
at _View_AppComponent_Host0.System.register.context_1.execute.DebugAppView.create (http://localhost:9000/assets/lib/angular__core/src/linker/view.js!transpiled:348:56)
at ComponentFactory.create (http://localhost:9000/assets/lib/angular__core/src/linker/component_factory.js!transpiled:170:48)
at ApplicationRef_.bootstrap (http://localhost:9000/assets/lib/angular__core/src/application_ref.js!transpiled:455:52)
at eval (http://localhost:9000/assets/lib/angular__core/src/application_ref.js!transpiled:364:101)
at Array.forEach (native)
at PlatformRef_._moduleDoBootstrap (http://localhost:9000/assets/lib/angular__core/src/application_ref.js!transpiled:364:54)
at eval (http://localhost:9000/assets/lib/angular__core/src/application_ref.js!transpiled:328:39)
at e.invoke (http://localhost:9000/assets/lib/zone.js/dist/zone.min.js:1:14497)
我曾嘗試回滾我所有的最新變化多,而且它並沒有解決任何事情。 我決定再回去儘可能簡單的應用程序,但仍然unsucesfully:
app.module:
// ANGULAR DEPENDENCIES
import { NgModule} from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { FormsModule, ReactiveFormsModule } from "@angular/forms"
import { HttpModule } from "@angular/http"
// COMPONENTS
import { AppComponent } from "./app.component"
@NgModule({
declarations: [ // directives and components
AppComponent
],
imports: [ // modules, constants and routes
BrowserModule,
ReactiveFormsModule,
FormsModule,
HttpModule
],
bootstrap: [AppComponent]
})
export class AppModule {}
而且app.component:
import { Component } from "@angular/core"
@Component({
selector: "app",
template: `'lol'`
})
export class AppComponent {
}
我的HTML基本上是<app></app>
任何想法這個錯誤是關於什麼,我很困惑,特別是因爲一切都工作了幾個小時前沒有一個有問題。
編輯:
main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { AppModule } from './app.module'
platformBrowserDynamic().bootstrapModule(AppModule)
你的main.ts是什麼? – anshuVersatile