How this datepicker works without adding ngMaterial as depdency?
Actual Behavior:
-
What is the issue? *The following datepicker works without adding ngMaterial as dependency -
What is the expected behavior?It should not work without adding ngMaterial as a dependency
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:Details:
http://codepen.io/sajeetharan/pen/GNENEx
Additional Information:
Browser Type: *Browser Version: *OS: *Stack Traces:
Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.
Do not modify the titles or questions. Simply add your responses to the ends of the questions. Add more lines if needed.
Actually, 'ngMaterial' is being loaded as a dependency on another file at the end on that codepen:
https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/assets-cache.js
var demoExampleAppName = 'MyApp';
angular.module(demoExampleAppName, ['ngMaterial', 'ngMessages'])
.run(function($templateCache) {
angular.forEach(assetMap, function(value, key) {
$templateCache.put(key, value);
});
});
And on your js file, you're only loading that already existing module:
angular.module('MyApp')
Check the documentation for modules for more info