What is a module?

devquora
devquora

Posted On: Feb 22, 2018

 

A module is a block which defines the boundaries of an angular application.Outside a module ,the angular features and properties will not work. It is implemented by using the directive “ng-app” and is referenced just below the angular framework’s javascript files. It is defined in the following fashion : 

 var app = angular.module("myApp", []);

In this code snippet,”myApp” is the name of the module and is mandatory.The square brackets “[]”, help to inject dependencies in our angular application.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    AngularJS Basic Interview Questions

    What is AngularJS?

    AngularJS is a javascript framework which helps in developing web applications in MVC architectural pattern & SPA or..

    AngularJS Basic Interview Questions

    What are angular directives?

    Angular directives are the attributes which are decorated on the html tags or elements of an html page. Directives have ..

    AngularJS Basic Interview Questions

    What are custom directives?

    Angular provides the ability to create our own directives to implement our own custom templates or logic in our web appl..