Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit bdaa006

Browse files
Gabriel DelépineGabriel Delépine
Gabriel Delépine
authored and
Gabriel Delépine
committed
Merge pull request #21 from ebrentnelson/main
Fix to work with custom $interpolationProvider
2 parents 19a5272 + 71cd846 commit bdaa006

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: angular-css-injector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* https://github.com/Yappli/angular-css-injector/
88
*/
99
angular.module('angular.css.injector', [])
10-
.provider('cssInjector', function() {
10+
.provider('cssInjector', ['$interpolateProvider', function($interpolateProvider) {
1111
var singlePageMode = false;
1212

1313
function CssInjector($compile, $rootScope, $rootElement){
@@ -39,7 +39,7 @@ angular.module('angular.css.injector', [])
3939
if(scope.injectedStylesheets === undefined)
4040
{
4141
scope.injectedStylesheets = [];
42-
head.append($compile("<link data-ng-repeat='stylesheet in injectedStylesheets' data-ng-href='{{stylesheet.href}}' rel='stylesheet' />")(scope)); // Found here : http://stackoverflow.com/a/11913182/1662766
42+
head.append($compile("<link data-ng-repeat='stylesheet in injectedStylesheets' data-ng-href='" + $interpolateProvider.startSymbol() + "stylesheet.href" + $interpolateProvider.endSymbol() + "' rel='stylesheet' />")(scope)); // Found here : http://stackoverflow.com/a/11913182/1662766
4343
}
4444
else
4545
{
@@ -90,4 +90,4 @@ angular.module('angular.css.injector', [])
9090
singlePageMode = mode;
9191
return this;
9292
}
93-
});
93+
}]);

Diff for: angular-css-injector.min.js

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)