Angular 6 - can't resolve all parameters for AppComponent

前端 未结 10 870
时光取名叫无心
时光取名叫无心 2021-02-07 11:59

I am trying to build an application with Angular 6 and I am still setting everything up. But it seems there is something wrong with the dependency injection in my app.

10条回答
  •  时光说笑
    2021-02-07 12:45

    GET / or compiler error can't resolve all parameters for ApplicationModule: (?).

    Just follow these simple steps :

    1. Install core-js modeule.

    npm i core-js

    1. In the polyfills.ts file add the import statement

    import 'core-js/es7/reflect';

    1. In main.ts file add the import statements

    import 'core-js/es6/reflect';

    import 'core-js/es7/reflect';

提交回复
热议问题