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

Commit 5510051

Browse files
Gabriel DelépineGabriel Delépine
Gabriel Delépine
authored and
Gabriel Delépine
committed
Rename project
1 parent 5750853 commit 5510051

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
angularDynamicStylesheets
1+
Angular-css-injector
22
=========================
33

4-
A angularJS service to load dynamically CSS files
4+
A angularJS service to load dynamically CSS files. The original name of this project was angularDynamicStylesheets.
55

66
=====
77
Description
88
====
9-
angularDynamicStylesheets is a AngularJS service allows you to load dynamically CSS files in your HTML page.
9+
angular-css-injector is a AngularJS service allows you to load dynamically CSS files in your HTML page.
1010

1111
====
1212
How to use ?
1313
====
1414

15-
1. First, add the module "DynamicStylesheets" to your AngularJS apps
15+
1. First, add the module "angular.css.injector" to your AngularJS apps
1616

17-
angular.module('yourModule', ['DynamicStylesheets']);
17+
angular.module('yourModule', ['angular.css.injector']);
1818

1919

2020
2. Get this service where you want and add your css files in your HTML page ! Example here in a controller :
2121

22-
function MyCtrl($scope, dynamicStylesheets)
22+
function MyCtrl($scope, cssInjector)
2323
{
24-
dynamicStylesheets.add("/path/to/your/css/file.css");
24+
cssInjector.add("/path/to/your/css/file.css");
2525
}
2626

2727
3. To remove all added CSS files when the page change (in a single page application), set the single page mode :
28-
function MyCtrl($scope, dynamicStylesheets)
28+
function MyCtrl($scope, cssInjector)
2929
{
30-
dynamicStylesheets.setSinglePageMode(true);
30+
cssInjector.setSinglePageMode(true);
3131
}
3232

3333
4. To remove manually all added CSS files, call the function removeAll :
34-
function MyCtrl($scope, dynamicStylesheets)
34+
function MyCtrl($scope, cssInjector)
3535
{
36-
dynamicStylesheets.removeAll();
36+
cssInjector.removeAll();
3737
}
3838

3939
====

0 commit comments

Comments
 (0)