Skip to content

Commit 5213ebe

Browse files
committed
Prepare version 0.8.0
1 parent baf6e0f commit 5213ebe

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

CHANGELOG.MD

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.8.0
4+
5+
This release adds the ``SpinnerVisibilityService``, a simple injectable service that allows you to manually show/hide the spinner.
6+
7+
See the [Manually show and hide the spinner](https://github.com/mpalourdio/ng-http-loader#manually-show-and-hide-the-spinner) section.
8+
39
## v0.7.1
410

511
This release is a bug fix release. It slightly improves the behavior of the ``filteredUrlPatterns`` so this parameter takes care of query strings too.
@@ -8,7 +14,7 @@ This release is a bug fix release. It slightly improves the behavior of the ``fi
814

915
This release adds the ``entryComponent`` property. It allows to specify your own component instead of the built-in ones. It uses the [NgComponentOutlet](https://angular.io/api/common/NgComponentOutlet) feature.
1016

11-
See [Defining your own spinner](https://github.com/mpalourdio/ng-http-loader#defining-your-own-spinner) section.
17+
See the [Defining your own spinner](https://github.com/mpalourdio/ng-http-loader#defining-your-own-spinner) section.
1218

1319
## v0.6.0
1420

README.MD

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,29 @@ You can also filter the http requests that shouldn't be caught by the intercepto
158158
<spinner [filteredUrlPatterns]="['\\d', '[a-zA-Z]', 'my-api']"></spinner>
159159
```
160160

161+
## Manually show and hide the spinner
162+
163+
You can manually show and hide the spinner component if needed. You must use the ``SpinnerVisibilityService`` for this purpose.
164+
165+
```typescript
166+
import { SpinnerVisibilityService } from 'ng-http-loader/services/spinner-visibility.service';
167+
168+
@Component({
169+
selector: 'my-component',
170+
templateUrl: './my.component.html',
171+
styleUrls: ['./my.component.css'],
172+
})
173+
export class MyComponent {
174+
175+
constructor(private visibilityService: SpinnerVisibilityService) {
176+
// show the spinner
177+
visibilityService.visibilitySubject.next(true);
178+
// hide the spinner
179+
visibilityService.visibilitySubject.next(false);
180+
}
181+
}
182+
```
183+
161184
## Misc
162185

163186
Each Spinkit component defined in [SPINKIT_COMPONENTS](src/spinkits.ts#L30) can be used independently.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-http-loader",
3-
"version": "0.7.1",
3+
"version": "0.8.0",
44
"scripts": {
55
"prepare-deploy": "gulp inline-templates && gulp clean-dist && ngc -p tsconfig.ngc.json && gulp clean-tmp && gulp copy-all",
66
"test": "ng test --watch false"

0 commit comments

Comments
 (0)