Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular TypeError: "provider.ngAfterViewInit is not a function at callProviderLifecycles"

Tags:

angular

I get the error

evt = TypeError: provider.ngAfterViewInit is not a function at callProviderLifecycles

in my Angular project. The mysterious thing is that not only do I not have an ngAfterViewInit method but I also don't have the corresponding implements clause.

The even odder thing is that I undo my file back to a previous state and it starts working again.

like image 468
Simon_Weaver Avatar asked Apr 19 '19 18:04

Simon_Weaver


1 Answers

It seems that something in the CLI caches which methods existed at some point in time.

I am using ng serve --source-map=false --aot --live-reload=false

Restarting ng serve cleared out whatever was caching this.

like image 86
Simon_Weaver Avatar answered Oct 09 '22 14:10

Simon_Weaver