After migrating Angular 6 to Angular 12 I got this error.
GET http://localhost:4200/sell-phone/sell-phone.html 404 (Not Found)
Error: [$compile:tpload] Failed to load template: ./sell-phone/sell-phone.html (HTTP status: 404 Not Found)
http://errors.angularjs.org/1.5.11/$compile/tpload?p0=.%2Fsell-phone%2Fsell-phone.html&p1=404&p2=Not%20Found
at angular.js:68
at handleError (angular.js:19761)
at processQueue (angular.js:16696)
at angular.js:16712
at Scope.$eval (angular.js:17994)
at Scope.$digest (angular.js:17808)
at Scope.$apply (angular.js:18102)
at done (angular.js:12082)
at completeRequest (angular.js:12291)
at XMLHttpRequest.requestLoaded [as __zone_symbol__ON_PROPERTYload]
I added the templateUrl like this:
templateUrl: './sell-phone/sell-phone.html',
I tried that also: by refering (NgUpgrade: Unable to use templateUrl when upgrading Angular1 components)
template: require('!raw-loader!./sell-phone/sell-phone.html'),
But it also not woking. What should I do to solve this issue. If you have any idea please tell me.