Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught referenceError : Angular is not defined

Tags:

angularjs

I am seeing the error as shown in the image. Error displayed in the console.

This is my App.js code:

 var app = angular.module('PopupDemo',[]);
 app.controller('PopupDemoCont',function($scope) {
 });

This is my HTML code:

<html>

<head>
    <title>SignUp</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="signup.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="js/App.js"></script>
    <script src="js/angular.min.js"></script>
    <script src="js/ui-bootstrap-tpls-0.14.3.min.js"></script>
</head>

<body ng-app="PopupDemo">

    <div data-toggle="validator" class="container-fluid" ng-controller="PopupDemoCont">
        <h1><b>Sign Up</b></h1>
        </br>
        <form id="form" name="userForm" action="Registration.html">
</body>

</html>

Can anyone fix this?

like image 471
supersaiyan Avatar asked Apr 06 '26 15:04

supersaiyan


2 Answers

Your app.js shoud be below angular reference

<script src="js/angular.min.js"></script>
<script src="js/App.js"></script>
like image 69
Vivz Avatar answered Apr 09 '26 05:04

Vivz


Your references Order should be

<script src="js/angular.min.js"></script>
<script src="js/App.js"></script>
like image 28
Sajeetharan Avatar answered Apr 09 '26 03:04

Sajeetharan