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="myApp" ng-controller="myController">
  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js">
    </script>
  </head>
  <body>
    <div>
      <label>Name:</label>
      <input type="text" ng-model="firstName" placeholder="Enter a name here">
      <input type="text" ng-model="lastName" placeholder="Enter a name here">
      <hr>
      <p>Hello <span ng-bind="firstName" + "lastName"></span></p>
      <h1>Hello {{firstName + " " +lastName}}!</h1>
    </div>

    <script>
    
    //Angular Model 
    var app=angular.module('myApp', []);
    
    //Angular Controller
    app.controller('myController',function($scope){
        $scope.firstName;
        $scope.lastName;
    });
        
    </script>
  </body>
</html>

Advertisements
Loading...

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