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

Commit b42a7e5

Browse files
committed
use the provider to set the single page mode in readme
1 parent c375964 commit b42a7e5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ How to use ?
2929
cssInjector.add("/path/to/your/css/file.css");
3030
}
3131
```
32-
4. To remove all added CSS files when the page change (in a single page application), set the single page mode :
32+
4. To remove all added CSS files when the page change (in a single page application), configure the `cssInjectorProvider`:
3333
```javascript
34-
function MyCtrl($scope, cssInjector)
35-
{
36-
cssInjector.setSinglePageMode(true);
37-
}
34+
myApp.config(function(cssInjectorProvider){
35+
cssInjecotrProvider.setSinglePageMode(true);
36+
});
3837
```
3938

4039
5. To remove manually all added CSS files, call the function removeAll :

0 commit comments

Comments
 (0)