Skip to content

Commit 781b88c

Browse files
committed
refactor: add multi-states animation example
1 parent 607ea98 commit 781b88c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: nativescript-angular/animations/transition-animation-engine.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function setStylesOverride(element: NgView, styles: ɵStyleData) {
4747
Object.keys(styles).forEach(prop => {
4848
const camelCaseProp = dashCaseToCamelCase(prop);
4949
element.style[camelCaseProp] = styles[prop];
50-
})
50+
});
5151
}
5252

5353
// extending Angular's TransitionAnimationEngine

Diff for: ng-sample/app/app.ts

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import { AnimationEnterLeaveTest } from "./examples/animation/animation-enter-le
4949
import { AnimationKeyframesTest } from "./examples/animation/animation-keyframes-test";
5050
import { AnimationNgClassTest } from "./examples/animation/animation-ngclass-test";
5151
import { AnimationStatesTest } from "./examples/animation/animation-states-test";
52+
import { AnimationStatesMultiTest } from "./examples/animation/animation-states-multi-test";
5253

5354
@NgModule({
5455
declarations: [
@@ -139,6 +140,7 @@ const customPageFactoryProvider = {
139140

140141
// animations
141142
platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationStatesTest));
143+
// platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationStatesMultiTest));
142144
// platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationNgClassTest));
143145
// platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationKeyframesTest));
144146
// platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationEnterLeaveTest));

Diff for: ng-sample/app/examples/animation/animation-states-test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
trigger("state", [
1818

1919
state("inactive", style({ "background-color": "red" })),
20-
state("active", style({ "background-color": "green" })),
20+
state("active", style({ "backgroundColor": "green" })),
2121

2222
transition("* => active", [ animate("600ms ease-out") ]),
2323
transition("* => inactive", [ animate("600ms ease-out") ]),

0 commit comments

Comments
 (0)