Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Data binding in AngularJs

    • 0
    • 2
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 652
    Comment on it

    Data-binding in AngularJs refers to the synchronization of data b/w the model and view components.
    When the model changes i.e if user changes in something then the view reflects the changes done.

    So in below example i am demonstrating you the concept of data binding in AngularJs:-

    <!DOCTYPE html>
    <html lang="en">
    <title>Angular Directives</title>
     
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
    </head>
     
    <body>
    <div ng-app>
     
       <p>Enter Your Name : <input type="text" ng-model="name"></p>
     
       <p>Hello {{name}} !</p>//Data Binding 
     
    </div>
     
    </body>
    </html>
    

    As in above example, you can check, how the model value is wrapped inside the binding expression {{name}}.

    So in AngularJs we can bind to the value using the double braces {{ with }}.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: