To build angular applications we need only one script file
that is angular.js to get this script file visit http://www.angularjs.org.
Click on DOWNLOAD ANGULARJS button and a popup window will
open as following
From here you can download the AngularJS script file or you
can use direct AngularJS CDN.
If you are .NET developer and you are developing a web
application using visual studio and AngularJS in your project then you can use NuGet
Manager to install AngularJS. You can also run the following commands on command
window and angularJs will be install in you project.
pm> Install-Package angularjs
pm> Install-Package angularjs.route
In this tutorial I will use inline coding as following
<!doctype html>
<html>
<head>
<script src =
"https://ajax.googleapis.com/ajax/libs/angularjs/1.5.2/angular.min.js"></script>
</head>
<body ng-app =
"angularApp">
<div ng-controller = "myController"
>
<h1>Welcome {{helloTo.title}}
</h1>
</div>
<script>
angular.module(" angularApp ", [])
.controller("myController",
function($scope) {
$scope.helloTo = {};
$scope.helloTo.title =
"Welcome to angularjs tutorial powered by codefari.com!";
});
</script>
</body>
</html>
|
Just copy and paste above code on html page and you will see
the message Welcome to
angularjs tutorial powered by codefari.com!