×

Html & Html5

The World's best Software Development Study Portal

AngularJS Intro


Angular JS is a JavaScript framework written in JavaScript for building single phase applications

And having some advantages of AngularJS over JavaScript like

  1. Dependency Injection &

  2. Two way data binding



  • AngularJS directives are HTML attributes with an ng prefix.

  • ng-app directive is starting point which defines an AngularJS application or it is like an "owner" of application .

  • The ng-init directive initializes AngularJS application variables.

  • ng-model directive binds the value of the input field.

  • ng-bind directive binds the content.


  • AngularJS modules define AngularJS applications.

    AngularJS controllers control AngularJS applications.

    ng-controller directive defines the controller.


    Add this libraray in script tag:
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>



    Here you will learn everything about directives, expressions, filters, modules,controllers,Events, DOM, Forms, Input, Validation, Http, and more.




    # What is Dependency Injection in Angular?
    It is a coding pattern in which a class receives its dependency from an external source rather than creating them itself.


    # What is Two-way data binding?

    Two-way data binding means any data-related changes affecting the model are immediately propagated to the matching view and that any changes made in the view are immediately reflected in the underlying model.