Angular CLI - Typescript throws: Cannot read property 'length' of undefined

前端 未结 9 2009
春和景丽
春和景丽 2021-02-07 04:24

I run in angular 4 project with ng serve and i get error

Cannot read property \'length\' of undefined

but I don\'t have any property length in

9条回答
  •  甜味超标
    2021-02-07 04:50

    In my case I did the following and it solved the issue:

    1. Create environments folder (if not exist) in src of the Project C:\Users\abcd\Desktop\MyApp\src

    2. Put the two files environment.ts and environment.prod.ts in environments folder.

提交回复
热议问题