<!doctype html> <html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script> </head> <body> <div ng-app="" ng-init="count=1;myCol='lightblue';person={firstName:'saad',lastName:'baaza'};points=[12,15,17]"> <label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here" style="background-color:{{myCol}}"> <hr> <h1>Hello {{yourName}}!</h1> <p><a ng-bind="yourName"></a></p> First Name : {{person.firstName}} </br> Last Name : {{person.lastName}}</br> Votre moyenne : {{(points[0]+points[1]+points[2])/3}} <p ng-bind="count"/> </div> <div ng-app="myApp" ng-controller="myController"> <a>here with controller !!!</a> <p>Hi Mr : {{firstName}}</p> </div> <script> var app = angular.module("myApp",[]); app.controller("myController",function($scope)){ $scope.firstName="saadovish"; $scope.lastName="baaza"; }); </script> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more