Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find namespace angular

I'm developing a Application using Angular and Typescript. That time i'm facing this error.

Error   21  Cannot find namespace 'angular'.

How to solve this??

like image 462
Sanjith M Avatar asked Oct 25 '17 10:10

Sanjith M


1 Answers

Maybe you should add angular types to tsconfig.json as following:

  {
...
"compilerOptions":
    ...
    "types": [
        "angular"
    ],
  }

If that won't work, since typings are deprecated, I suggest you to install @types/angular with npm:

npm install --save-dev @types/angular

and include it as above.

like image 135
Nawrez Avatar answered Oct 03 '22 01:10

Nawrez