Home »
MCQs »
AngularJS MCQs
Which is the correct syntax to create a module?
12. Which is the correct syntax to create a module?
- var variable_name = angular.module("app_name", []);
- var variable_name = angular.module("app_name", []);
- var variable_name = angular.module("app_name", []);
- var variable_name = angular.module("app_name", []);
Answer: A) var variable_name = angular.module("app_name", []);
Explanation:
The correct syntax to create a module using the angular.module is:
var variable_name = angular.module("app_name", []);