|
14 | 14 | * AngularCSS Module
|
15 | 15 | * Contains: config, constant, provider and run
|
16 | 16 | **/
|
17 |
| - var angularCSS = angular.module('door3.css', []); |
| 17 | + var angularCSS = angular.module('angularCSS', []); |
| 18 | + |
| 19 | + // Old module name handler |
| 20 | + angular.module('door3.css', []) |
| 21 | + .run(function () { |
| 22 | + console.error('AngularCSS: The module name "door3.css" is now deprecated. Please use "angularCSS" instead.'); |
| 23 | + }); |
18 | 24 |
|
19 | 25 | // Provider
|
20 | 26 | angularCSS.provider('$css', [function $cssProvider() {
|
|
48 | 54 | // Using correct interpolation symbols.
|
49 | 55 | template = template
|
50 | 56 | .replace(/{{/g, $interpolate.startSymbol())
|
51 |
| - .replace(/}}/g, $interpolate.endSymbol()) |
52 |
| - ; |
| 57 | + .replace(/}}/g, $interpolate.endSymbol()); |
53 | 58 |
|
54 | 59 | // Variables - default options that can be overridden from application config
|
55 | 60 | var mediaQuery = {}, mediaQueryListener = {}, mediaQueriesToIgnore = ['print'], options = angular.extend({}, defaults),
|
|
227 | 232 | }
|
228 | 233 | }
|
229 | 234 | });
|
230 |
| - } |
| 235 | + }; |
231 | 236 | // Listen for media query changes
|
232 | 237 | mediaQuery[stylesheet.href].addListener(mediaQueryListener[stylesheet.href]);
|
233 | 238 | // Invoke first media query check
|
|
492 | 497 | // Avoid adding duplicate stylesheets
|
493 | 498 | if (stylesheet.href && !$filter('filter')($rootScope.stylesheets, { href: stylesheet.href }).length) {
|
494 | 499 | // Bust Cache feature
|
495 |
| - bustCache(stylesheet) |
| 500 | + bustCache(stylesheet); |
496 | 501 | // Media Query add support check
|
497 | 502 | if (isMediaQuery(stylesheet)) {
|
498 | 503 | addViaMediaQuery(stylesheet);
|
|
571 | 576 | var result = '';
|
572 | 577 | angular.forEach(stylesheets, function (stylesheet) {
|
573 | 578 | result += '<link rel="' + stylesheet.rel + '" type="' + stylesheet.type + '" href="' + stylesheet.href + '"';
|
574 |
| - result += (stylesheet.media ? ' media="' + stylesheet.media + '"' : '') |
| 579 | + result += (stylesheet.media ? ' media="' + stylesheet.media + '"' : ''); |
575 | 580 | result += '>\n\n';
|
576 | 581 | });
|
577 | 582 | return result;
|
|
0 commit comments