I recently started working on an angularJS web app using a purchased template that has all its controllers, routes, and directives in a single file called app.js
.
This is my first dive into angularJS and front-end development. Hoping to become a Full Stack geek now.. :D
However, I've hit a roadblock. The app functions perfectly fine until I try to add a new controller AuthCtrl
from another file named auth.js
. It throws an error saying AppCtrl
not found. Below HTML snippet highlights the exact issue:
<!doctype html>
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<!-- rest of the provided HTML content stays same -->
<span class="highlight">/*Code ommitted for brevity*/</span>
<script src="scripts/controllers/auth.js"></script>
<span class="beginning">(function() {</span>
<span class="content-indent">"use strict";</span>
angular.module("app.chart.ctrls",[])
.controller("chartCtrl",[
"$scope",
function($scope){ ....