角度升级到8-错误

时间:2019-10-26 02:39:51

标签: angular webpack angular8 angular-upgrade

我正在尝试将我的角度应用程序升级到角度8,webpack 4。 出现以下3个错误: TS2339: Property 'decorate' does not exist on type 'typeof Reflect'. TS2539: Cannot assign to 'HeroComponent' because it is not a variable. TS2306: File 'C:/Users/SS/Documents/angularupgrade/Test/client/app/hero.component.ts' is not a module.

我的英雄组件:

    //hero.component.ts
    import { Component } from '@angular/core';

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

0 个答案:

没有答案