====== Requirejs - Angularjs Equipvalence ======
===== - Angular Module dependency =====
==== - Using Module in Angularjs ====
**index.html**
#index.html
AngularJS Plunker
<---------- library file------------
Where is the MODULE NAME defined?
1 /*!
2 * Angular Material Design
3 * https://github.com/angular/material
4 * @license MIT
5 * v0.11.4
6 */
7 (function( window, angular, undefined ){
8 "use strict";
9
10 (function(){
11 "use strict";
12
13 angular.module('ngMaterial', ["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.layout","material.core.theming.palette","material.core.theming","material.core.animate","mate rial.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.ch ips","material.components.content","material.components.dialog","material.components.divider","material.components.datepicker","material.components.fabActions","material.components.fabShared","material.com ponents.fabSpeedDial","material.components.fabToolbar","material.components.fabTrigger","material.components.gridList","material.components.icon","material.components.input","material.components.list","mat erial.components.menu","material.components.menuBar","material.components.progressCircular","material.components.radioButton","material.components.progressLinear","material.components.select","material.com ponents.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.toast","material.com ponents.tabs","material.components.toolbar","material.components.tooltip","material.components.virtualRepeat","material.components.whiteframe"]);
14 })();
15 (function(){
16 "use strict";
**script.js**
var app = angular.module('StarterApp', ['ngMaterial']); <---------- MODULE NAME ngMaterial-----------
app.controller('AppCtrl', ['$scope', '$mdSidenav', function($scope, $mdSidenav){ <-------$mdXXXX defined in MODULE ngMaterial---
$scope.toggleSidenav = function(menuId) {
$mdSidenav(menuId).toggle();
};
}]);
==== - Using Module with Requirejs ====
**index.html**
#index.html
...