Angular4 What definition of Iterable should I use

后端 未结 2 447
闹比i
闹比i 2020-12-12 03:45

I have upgraded my app to the latest Angular 4 (beta-8) version. However I keep having the following error :

@angular\\core\\src\\change_detecti

相关标签:
2条回答
  • 2020-12-12 04:07

    Following the migration stated in their changelog you should add es2015.iterable as a lib inside your tsconfig.json:

    {
      ...,
      "compilerOptions" : {
         ...,
         "lib": ["es6", "dom", "es2015.iterable"]
       }
    }
    
    0 讨论(0)
  • 2020-12-12 04:17

    I tried the accepted answer for this question but it didn't work in my case.

    In my case I added below line in my main.ts

    ///<reference path="./../typings/globals/core-js/index.d.ts"/>
    

    which fixed the issue, hope this helps someone.

    0 讨论(0)
提交回复
热议问题