I am a beginner in angular, I am trying to load and use it in my web application (VS) but each time I get problems with recognizing angular and I dont know why...I tried different things but all have the same output - not recognizing angular
I download angular.min.js from angular website and add link to this js folder from my page
tried
<script src="Scripts/angular.js"></script>no change...tried using package manager console : <
PM> Install-Package angularjsadded successfully...
here is a full code from my HTML page...
<html xmlns="http://www.w3.org/1999/xhtml" data-ng-app="test"> <head runat="server"> <script src="Scripts/angular.min.js"></script> <script src="Scripts/app.js"></script> <title></title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> </body> </html> //app.js
(function () { var app = angular.module('test',[]); }); *UPDATE: I get this error :
Unhandled exception at line 7, column 218 in http://localhost:4191/Scripts/angular.min.js 0x800a138f - JavaScript runtime error: Object expected Solution : I used angular.min.js - changes it to src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.js". problem solved.