Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Online AngularJS Editor

<!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>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.