Prev Demo
AngularJS
>
Conroller
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> </head> <script> var myApp = angular.module('myApp', []); myApp.controller('MyController', function($scope) { $scope.FirstName = 'Tech'; $scope.LastName = 'Funda'; $scope.FullDetails = function () { return $scope.FirstName + ' ' + $scope.LastName; }; }); </script> <body ng-app="myApp"> <div ng-controller="MyController"> First name: <b>{{ FirstName }}</b> Last Name: <b>{{ LastName }}</b> <p>Full name is <b>{{ FullDetails() }}</b></p> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output