Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy Controllers in Angular JS</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script> </head> <body> <div ng-app="ngApp" ng-controller="ngCtrl"> Name: <input type="text" ng-model="Name"><br> Email: <input type="text" ng-model="Email"><br> <br> Name and Email: {{Name + " " + Email}} </div> <script> var app = angular.module('ngApp', []); app.controller('ngCtrl', function($scope) { $scope.Name = "WIKITECHY"; $scope.Email = "learn@wikitechy.com"; }); </script> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.