In the previous article we introduced AngularJS. In this article contains brief information about AngularJS environment setup. We shall explain how you can can turn a normal HTML application into an AngularJS application. We shall also explain basic components of an AngularJS application. In this article, we shall do some real coding, so let the fun begin!
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> </head> <body> <div ng-app=""> <p>Car Name: <input type="text" ng-model="carname"></p> <p ng-bind="carname"></p> </div> </body> </html>
If you look at the code above, you should see three attributes ng-app, ng-model, ng-bind. These are basically AngularJS directives. AngularJS Directives are attributes that extend HTML elements to include AngularJS functionalities. We shall study AngularJS directives in more detail in an upcoming article. For now just breifly explain what these three directives do.
In this article we studied AngularJS Environment Setup. In the next article, we shall how what MVC architecture is and how AngularJS makes use of it.