Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS Controllers Example
Keywords : Angularjs create controller example, Angularjs controller to control flow of data example
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> AngularJs Controllers Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script type="text/javascript"> var app = angular.module('angularctrlapp', []); app.controller('angularctrl', function ($scope) { $scope.fname = "Welcome to"; $scope.lname = "Tutlane"; }); </script> </head> <body> <h2>AngularJS Controller Example</h2> <div ng-app="angularctrlapp" ng-controller="angularctrl"> First Name: {{fname}}<br /> Last Name: {{lname}}<br /> Full Name: <b>{{fname +" "+ lname}}</b> </div> </body> </html>
Click Here to See Result
Result
Previous
Next