Skip to content

Commit

Permalink
ngOnInit
Browse files Browse the repository at this point in the history
  • Loading branch information
okunokentaro committed Jul 30, 2016
1 parent 2f97753 commit 5a3b8e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/app.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ const DEFAULT_BPM = 120;
</ul>
<input type="range" [ngModel]="bpm" (ngModelChange)="onBpmChange($event)" name="bpm" min="40" max="200">
<button (click)="contract()">-</button>
<button (click)="expand()">+</button>
<button (click)="expand()">+</button>
{{bpm}}
`
})
export class AppComponent {
constructor(@Inject(FrameService) frame) {
this.frame = frame;

this.run(DEFAULT_BPM);

this.range = 16;
this.grids = lodash.range(this.range);
}

ngOnInit() {
this.run(DEFAULT_BPM);
}

expand() {
this.range = this.range + 4;
this.updateGrid();
Expand Down

0 comments on commit 5a3b8e1

Please # to comment.