Skip to content

Commit b0db86f

Browse files
committed
updated ngOnchanges values
1 parent 9dc5e90 commit b0db86f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
[![npm](https://img.shields.io/npm/l/angular-svg-progress.svg)](https://www.npmjs.com/package/angular-svg-progress)
2-
[![npm](https://img.shields.io/npm/v/angular-svg-progress.svg?style=flat-square)](https://www.npmjs.com/package/angular-svg-progress)
3-
[![npm](https://badgen.net/npm/dm/angular-svg-progress)](https://www.npmjs.com/package/angular-svg-progress)
4-
[![npm](https://badgen.net/bundlephobia/minzip/angular-svg-progress)](https://www.npmjs.com/package/angular-svg-progress)
5-
##### 1.7 min zipped lightweight progress bar
6-
1+
https://badgen.net/bundlephobia/minzip/angular-svg-progress
2+
1.7 min zipped lightweight progress bar
73
# Angular SVG Progress
84
**SVG** Progress component for angular and ionic framework consist of bar, heart and circular loaders.
95

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-svg-progress",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"peerDependencies": {
55
"@angular/common": "^7.2.0",
66
"@angular/core": "^7.2.0"

src/lib/angular-svg-progress.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export class AngularSvgProgressComponent implements OnInit {
5757
console.log(this.direction, this.x2, this.y1);
5858
}
5959
ngOnChanges(changes: SimpleChanges) {
60-
const { currentValue, previousValue } = changes['svgProgress'];
60+
const { currentValue, previousValue } = changes['svgProgress'] || {
61+
currentValue: 0, previousValue: 0
62+
};
6163
this.progress = currentValue.toString() + `%`;
6264
if (this.shape === 'circle') {
6365
this.strokeDashoffset = this.circumference * (1 - (this.svgProgress / 100));

0 commit comments

Comments
 (0)