Skip to content

Commit fbdd9de

Browse files
committed
Updated module name
1 parent cb067e3 commit fbdd9de

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

angular-css.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
* AngularCSS Module
1515
* Contains: config, constant, provider and run
1616
**/
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+
});
1824

1925
// Provider
2026
angularCSS.provider('$css', [function $cssProvider() {
@@ -48,8 +54,7 @@
4854
// Using correct interpolation symbols.
4955
template = template
5056
.replace(/{{/g, $interpolate.startSymbol())
51-
.replace(/}}/g, $interpolate.endSymbol())
52-
;
57+
.replace(/}}/g, $interpolate.endSymbol());
5358

5459
// Variables - default options that can be overridden from application config
5560
var mediaQuery = {}, mediaQueryListener = {}, mediaQueriesToIgnore = ['print'], options = angular.extend({}, defaults),
@@ -227,7 +232,7 @@
227232
}
228233
}
229234
});
230-
}
235+
};
231236
// Listen for media query changes
232237
mediaQuery[stylesheet.href].addListener(mediaQueryListener[stylesheet.href]);
233238
// Invoke first media query check
@@ -492,7 +497,7 @@
492497
// Avoid adding duplicate stylesheets
493498
if (stylesheet.href && !$filter('filter')($rootScope.stylesheets, { href: stylesheet.href }).length) {
494499
// Bust Cache feature
495-
bustCache(stylesheet)
500+
bustCache(stylesheet);
496501
// Media Query add support check
497502
if (isMediaQuery(stylesheet)) {
498503
addViaMediaQuery(stylesheet);
@@ -571,7 +576,7 @@
571576
var result = '';
572577
angular.forEach(stylesheets, function (stylesheet) {
573578
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 + '"' : '');
575580
result += '>\n\n';
576581
});
577582
return result;

0 commit comments

Comments
 (0)