<!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>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more