angular-bootstrap-1

 

angular.bootstrap provide the facility to remove the NG-APP tag from html. This is the alternate way to enable angular without using ng-app directive. Here is the code for bootstrap: angular.bootstrap(document, ['app']); See the code snippet:

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body> <div ng-controller="bootstrapController"> {{name}} </div> </body> </html> <script> var app = angular.module("app", []); app.controller('bootstrapController', ['$scope', function ($scope) { $scope.name = "LearnKode"; }]); angular.bootstrap(document, ['app']); </script>
Output