mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
clean rating component (#1854)
This commit is contained in:
parent
934509c7ba
commit
4188a5aee9
@ -65,7 +65,7 @@ describe('Like component', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
it('should like component should be present', (done) => {
|
||||
it('should like component be present', (done) => {
|
||||
fixture.detectChanges();
|
||||
|
||||
component.ngOnChanges().subscribe(() => {
|
||||
|
@ -42,6 +42,8 @@ export class LikeComponent {
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
this.clean();
|
||||
|
||||
let ratingObserver = this.ratingService.getRating(this.nodeId, this.ratingType);
|
||||
|
||||
ratingObserver.subscribe(
|
||||
@ -77,4 +79,9 @@ export class LikeComponent {
|
||||
|
||||
this.changeVote.emit(this.likesCounter);
|
||||
}
|
||||
|
||||
clean() {
|
||||
this.isLike = false;
|
||||
this.likesCounter = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user