How to fix error caused by separating the angularjs code from the html code?


I am setting up the app.js file in my angular application but i am getting n error in the console. I have all the files following the each other as recommended and icluded. How do i solve this error “

Error: “[$compile:tpload]$compile/tpload?p0=main.html&p1=404&p2=Not%20Found“?

Below is the code i am using.

<meta charset="utf-8">
<link rel="stylesheet" href="  /4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="content/css/main.css">
<script src=""></script>
<script src=""></script>
<script src="app.js"></script>

<body class="main_bg" ng-app="Travelapp">
    <div class="container">
    <div ng-view></div>

var app = angular.module('Travelapp', ["ngRoute"]);
      templateUrl: "main.html",
      controller: "mainController"
      template: "<h1>Request error</h1><br/><p>Error in your request, Could not be handled</p>"

app.controller("mainController", function($scope){    


The error says that your main.html “Not Found”.
The cause of it can be that this file does not exist

Answered By – Maksym Petrenko

Answer Checked By – Willingham (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.