feat(animations): allow animation integration support into host params
Closes #9044 Closes #9933
This commit is contained in:
@ -19,22 +19,23 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
host: {
|
||||
'[@backgroundAnimation]': "bgStatus"
|
||||
},
|
||||
selector: 'animate-app',
|
||||
styleUrls: ['css/animate-app.css'],
|
||||
template: `
|
||||
<div [@backgroundAnimation]="bgStatus">
|
||||
<button (click)="state='start'">Start State</button>
|
||||
<button (click)="state='active'">Active State</button>
|
||||
|
|
||||
<button (click)="state='void'">Void State</button>
|
||||
<button (click)="state='default'">Unhandled (default) State</button>
|
||||
<button style="float:right" (click)="bgStatus='blur'">Blur Page</button>
|
||||
<hr />
|
||||
<div *ngFor="let item of items" class="box" [@boxAnimation]="state">
|
||||
{{ item }}
|
||||
<div *ngIf="true">
|
||||
something inside
|
||||
</div>
|
||||
<button (click)="state='start'">Start State</button>
|
||||
<button (click)="state='active'">Active State</button>
|
||||
|
|
||||
<button (click)="state='void'">Void State</button>
|
||||
<button (click)="state='default'">Unhandled (default) State</button>
|
||||
<button style="float:right" (click)="bgStatus='blur'">Blur Page (Host)</button>
|
||||
<hr />
|
||||
<div *ngFor="let item of items" class="box" [@boxAnimation]="state">
|
||||
{{ item }}
|
||||
<div *ngIf="true">
|
||||
something inside
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
@ -2,6 +2,17 @@
|
||||
<html>
|
||||
<title>Animation Example</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
||||
<style>
|
||||
animate-app {
|
||||
display:block;
|
||||
position:fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
padding:50px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<animate-app>Loading...</animate-app>
|
||||
<script src="../bootstrap.js"></script>
|
||||
|
Reference in New Issue
Block a user