Simple Databinding in Angular JS

Think of your model as the single-source-of-truth for your application. Your model is where you go to to read or update anything in your application.


Here is example of simple data-binding
<!doctype html>
<html ng-app>
  <head>
  </head>
  <body>
    <div>
      <label>Name:</label>
      <input type="text" ng-model="yourName" placeholder="Enter a name here">
      <hr>
      <h1>Hello, {{yourName}}!</h1>
    </div>
  </body>
</html>


Comments

Popular posts from this blog

Setup and implement simple angular.js program in MVC

Cross browsers detect print events using javascript

HTML5 drag and drop