角度8:无法解析e的所有参数

时间:2019-06-19 22:06:26

标签: angular

我正在建立一个角度为8的新项目,我已经将角度更新为最新版本。但我收到“未捕获的错误:无法解析e:(?)的所有参数。”在只有初始文件的简单基础项目中。

我正在使用webpack进行构建和构建,创建了单个文件,构建没有错误

main.ts

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app.module';

platformBrowserDynamic().bootstrapModule(AppModule);

app.module.ts

import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent }  from './app.component';

@NgModule({
  imports:      [ BrowserModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `<h1>Hello {{name}} bla bla</h1>`,
})
export class AppComponent  { name = 'Angular'; }

enter image description here

0 个答案:

没有答案