1

I have the following simple html file

<!DOCTYPE html>
<html ng-app="store">
<head>
    <title></title>
    <link href="bootstrap.min.css" rel="stylesheet" />
    
</head>
<body>
    
<script src="angular.min.js"  type="text/javascript" ></script>
    <script src="app.js"></script>

    <p>{{Hello Angular!!}}</p>
</body>
</html>

and app.js file

'use strict';
var app = angular.module('store', []);

I'm getting error "angular is undefined" while running HTML file under webserver. Can anyone please suggest what I'm doing wrong!

3
  • Hi Anil, Sorry! it didn't help. I'm a beginner in AngularJS and want to use minimal code to see how angularjs works. Commented Mar 5, 2015 at 9:44
  • 1
    You can learn basic here. w3schools.com/angular Commented Mar 5, 2015 at 9:46
  • 1
    You can use below links. tutorials.jenkov.com/angularjs/index.html and toptal.com/angular-js/… Commented Mar 5, 2015 at 9:49

1 Answer 1

2

Please check your reference file.

like.

<!DOCTYPE html>
<html ng-app="store">
<head>
    <title></title>
    <link href="bootstrap.min.css" rel="stylesheet" />  
</head>
<body>  
    <script src="https://code.angularjs.org/1.4.0-beta.5/angular.js"></script>
    <script src="app.js"></script>

    <p>{{Hello Angular!!}}</p>
</body>
</html>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.