| 369 | |
| 370 | function createMyAnimationApp(standalone: boolean) { |
| 371 | @Component({ |
| 372 | standalone, |
| 373 | selector: 'app', |
| 374 | template: ` <div [@myAnimation]="state"> |
| 375 | <svg *ngIf="true"></svg> |
| 376 | {{ text }} |
| 377 | </div>`, |
| 378 | animations: [ |
| 379 | trigger('myAnimation', [ |
| 380 | state('void', style({'opacity': '0'})), |
| 381 | state( |
| 382 | 'active', |
| 383 | style({ |
| 384 | 'opacity': '1', // simple supported property |
| 385 | 'font-weight': 'bold', // property with dashed name |
| 386 | 'transform': 'translate3d(0, 0, 0)', // not natively supported by Domino |
| 387 | }), |
| 388 | ), |
| 389 | transition('void => *', [animate('0ms')]), |
| 390 | ]), |
| 391 | ], |
| 392 | }) |
| 393 | class MyAnimationApp { |
| 394 | state = 'active'; |
| 395 | |
| 396 | constructor(private builder: AnimationBuilder) {} |
| 397 | |
| 398 | text = 'Works!'; |
| 399 | } |
| 400 | |
| 401 | return MyAnimationApp; |
| 402 | } |