Question:Which is the correct syntax of creating AngularJS Controller? 

A var app = angular.module('myApp', []); angular.controller('myCtrl', function(app,$scope) { }); 

B var app = angular.module('myApp', []); app.controller('myCtrl', function($scope) { }); 

C var app = module('myApp', []); app.controller('myCtrl', function($scope) { }); 

D var app = angular.module('myApp', []); app.controller( function($scope) { }); 

+ Answer
+ Report
Total Preview: 2755

Copyright © 2024. Powered by Intellect Software Ltd