diff --git a/src/app/app.component.html b/src/app/app.component.html index 719df75..ee13105 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,6 +2,6 @@

{{title}}

- + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 7e52241..f9b5b11 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ -import {Component, trigger, keyframes, animate, transition, style} from '@angular/core'; +import {Component, trigger, keyframes, animate, transition, style, NgZone} from '@angular/core'; @Component({ selector: 'app-root', @@ -22,11 +22,17 @@ export class AppComponent { title = 'app works!'; public wobbleState: string; - triggerAnimation() { + constructor(public zone: NgZone) { + } + triggerAnimation() { + this.wobbleState = "active"; } reset() { + this.zone.run(() => { + this.wobbleState = "inactive"; + }); } }