style(lint): re-format modules/@angular
This commit is contained in:
@ -1,17 +1,15 @@
|
||||
import {AUTO_STYLE, Component, trigger, state, animate, transition, style} from '@angular/core';
|
||||
import {AUTO_STYLE, Component, animate, state, style, transition, trigger} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: "animate-cmp",
|
||||
animations: [
|
||||
trigger('openClose', [
|
||||
state("*", style({ height: AUTO_STYLE, color: 'black', borderColor: 'black' })),
|
||||
state('closed, void',
|
||||
style({ height:"0px", color: "maroon", borderColor: "maroon" })),
|
||||
state('open',
|
||||
style({ height: AUTO_STYLE, borderColor:"green", color:"green" })),
|
||||
transition("* => *", animate(500))
|
||||
])
|
||||
],
|
||||
selector: 'animate-cmp',
|
||||
animations: [trigger(
|
||||
'openClose',
|
||||
[
|
||||
state('*', style({height: AUTO_STYLE, color: 'black', borderColor: 'black'})),
|
||||
state('closed, void', style({height: '0px', color: 'maroon', borderColor: 'maroon'})),
|
||||
state('open', style({height: AUTO_STYLE, borderColor: 'green', color: 'green'})),
|
||||
transition('* => *', animate(500))
|
||||
])],
|
||||
template: `
|
||||
<button (click)="setAsOpen()">Open</button>
|
||||
<button (click)="setAsClosed()">Closed</button>
|
||||
@ -23,17 +21,9 @@ import {AUTO_STYLE, Component, trigger, state, animate, transition, style} from
|
||||
`
|
||||
})
|
||||
export class AnimateCmp {
|
||||
stateExpression:string;
|
||||
constructor() {
|
||||
this.setAsClosed();
|
||||
}
|
||||
setAsSomethingElse() {
|
||||
this.stateExpression = 'something';
|
||||
}
|
||||
setAsOpen() {
|
||||
this.stateExpression = 'open';
|
||||
}
|
||||
setAsClosed() {
|
||||
this.stateExpression = 'closed';
|
||||
}
|
||||
stateExpression: string;
|
||||
constructor() { this.setAsClosed(); }
|
||||
setAsSomethingElse() { this.stateExpression = 'something'; }
|
||||
setAsOpen() { this.stateExpression = 'open'; }
|
||||
setAsClosed() { this.stateExpression = 'closed'; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user