Following the build of my Angular app, I encountered this error message: [$compile:tpload] Failed to load template: app/app.html (HTTP status: 404 Not Found). Seeking assistance from you all!!!!!
app.html
<div class="root">
<div ui-view></div>
</div>
app.component.js
(function(angular) {
'use strict'
var app = {
templateUrl:"app/app.html"
}
angular.module('mainApp')
.component('app',app);
})(window.angular);
index.html
<!doctype html>
<html class="no-js" lang="" ng-app="mainApp">
<head>
<meta charset="utf-8>
<meta http-equiv="x-ua-compatible" content="ie=edge>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1>
<link rel="apple-touch-icon" href="apple-touch-icon.png>
<title>IES</title>
<!-- Place favicon.ico in the root directory -->
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css({.tmp/serve,src}) styles/vendor.css -->
<!-- bower:css -->
<!-- run `gulp inject` to automatically populate bower styles dependencies -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css({.tmp/serve,src}) styles/app.css -->
<!-- inject:css -->
<!-- css files will be automatically insert here -->
<!-- endinject -->
<!-- endbuild -->
<!--<script src="bower_components/angular/angular.js></script>-->
</head>
<body>
<app></app>
</body>
<!-- build:js(src) scripts/vendor.js -->
<!-- bower:js -->
<!-- run `gulp inject` to automatically populate bower script dependencies -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js -->
<!-- inject:js -->
<!-- js files will be automatically insert here -->
<!-- endinject -->
<!-- inject:partials -->
<!-- angular templates will be automatically converted in js and inserted here -->
<!-- endinject -->
<!-- endbuild -->
</html>
app.module.js
(function(angular) {
'use strict';
angular.module('mainApp',[
'components',
'common',
])
.config(['$httpProvider', function ($httpProvider) {
$httpProvider.interceptors.push('HeaderInterceptor');
console.log("Configuration Hook");
}])
.run(['$http', '$rootScope', function ($http, $rootScope) {
if (typeof $rootScope.global === "undefined") {
if (localStorage.getItem('user')) {
$rootScope.global = {
user: JSON.parse(localStorage.getItem('user')),
}
}
}
}])
})(window.angular, window.localStorage);
If you wish to view the entire code, it is available here on GitHub