Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
akserg committed Sep 24, 2016
2 parents 7814c31 + 8f754f6 commit 2e207b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import {SlimLoadingBarService} from 'ng2-slim-loading-bar';
<div>Hello world</div>
<button (click)="startLoading()">Start Loading</button>
<button (click)="stopLoading()">Stop Loading</button>
<button (click)="completeLoading()">Complete Loading</button>
<ng2-slim-loading-bar></ng2-slim-loading-bar>
`
})
Expand All @@ -108,17 +109,21 @@ export class AppComponent {
stopLoading() {
this.slimLoadingBarService.stop();
}

completeLoading() {
this.slimLoadingBarService.complete();
}
}
```

#### 3. Customize the the `ng2-slim-loading-bar` for your application
You can use the following properties to customize the `ng2-slim-loading-bar` component in your template:
- `color` - The color of loading bar. Default is `firebrick`. Any CSS compatible value.
- `height` - The height of loading bar. Defaukt value is `2px`.
- `show` - The flag helps hide and show the loading bar. Devault value is `true`
- `height` - The height of loading bar. Default value is `2px`.
- `show` - The flag helps hide and show the loading bar. Devault value is `true`.

Example:
`<ng2-slim-loading-bar [color]="blue" [height]="4px"></ng2-slim-loading-bar>`
`<ng2-slim-loading-bar [color]="'blue'" [height]="'4px'"></ng2-slim-loading-bar>`

#### 4. Manage the loading bar
You can use the following properties to customize the SlimLoadingBar via instance of SlimLoadingBarService:
Expand Down
2 changes: 1 addition & 1 deletion src/slim-loading-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {isPresent} from './slim-loading-bar.utils';
* A Slim Loading Bar component shows message loading progress bar on the top of web page or parent component.
*/
@Component({
moduleId: module.id,
moduleId: module.id.toString(),
selector: 'ng2-slim-loading-bar',
template: `
<div class="slim-loading-bar">
Expand Down

0 comments on commit 2e207b4

Please sign in to comment.