I have a issue when compile my angular
ERROR in Error during template compile of 'ɵa' Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Injectable' 'Injectable' calls 'ɵmakeDecorator'.
How could I fix this error?
I have a issue when compile my angular
ERROR in Error during template compile of 'ɵa' Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'Injectable' 'Injectable' calls 'ɵmakeDecorator'.
How could I fix this error?
So, I had this exact same issue when attempting to update Angular from 4.x to 5.x.
The problem has something to-do with the AOT compilation, but dont ask me any further on this. I cant explain anything in detail.
However, go to your tsconfig.app.json and add the following line:
"paths": { "@angular/*": ["../node_modules/@angular/*"] },
Also make sure that in the same file, the module is set to 'es2015'.
Hope this works for you!
I would check any 3rd party tools you're using to make sure they don't have dev-dependencies on an older version of Angular.
I was seeing this same error when I updated Angular from 4.x to 5.x, and I later noticed that one of my 3rd party libraries was actually installing its own version of Angular 4.x as a dev-dependency.
Unfortunately in my case this library didn't have a newer version that supported Angular 5.x, so I had to switch it out.