AngularJS Modulevar app = angular. Module('myApp', []); AngularJS ControllerApp.Controller(‘Myctrlfunction ( Span class= "Hl-code" >$scope) { $scope.firstname= "Johnscope.lastname= "Doe "}) AngularJS instances<div Ng-app="myApp" ng-controller="Myctrl" > < Span class= "Hl-var" > name: <input type= "text" ng-model= "firstName "><br> surname: <input type= "text" ng-model= "lastName" ><br> <br> < Span class= "hl-quotes" > < Span class= "hl-brackets" > name: {{firstName + "" + LastName}} </div > < Span class= "Hl-code" > < Span class= "hl-quotes" > <script> < Span class= "hl-string" > < Span class= "hl-brackets" > var app = Angular.module (' myApp ', []); < Span class= "hl-string" > < Span class= "hl-brackets" > app.controller (' Myctrl ', function ($scope) < Span class= "hl-string" > < Span class= "hl-brackets" > < Span class= "Hl-code" > </script >
Angular JS module, angular JS controller