User Tools

Site Tools


technical_notes:public:angularjs-getting-started

Parent

AngularJs - Getting started

Hello World

angularjs.html
<!DOCTYPE html>
<html ng-app>
  <body>
    <h1>{{hello}}</h1>
    <input type="text" ng-model="hello" />
  </body>
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
</html>

Binding (play with bootstrap)

  • Write alert-info in textbox
angularjs-binding.html
<!DOCTYPE html>
<html ng-app>
  <head>
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
  </head>
  <body>
    <h1>{{hello}}</h1>
    <input type="text" ng-model="hello" />
    <div class="alert {{hello}}">Wrap me with alert</div>
  </body>
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js">
  </script>
 
</html>

Controler

technical_notes/public/angularjs-getting-started.txt · Last modified: 2014/05/05 18:02 by Fabien Arcellier