Fix undefined running access
This commit is contained in:
parent
2d5cc889f0
commit
572406b963
2 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
<material-button id="reset" (click)="onResetClicked()"><material-icon icon="replay" baseline></material-icon></material-button>
|
<material-button id="reset" (click)="onResetClicked()"><material-icon icon="replay" baseline></material-icon></material-button>
|
||||||
<material-button id="run" (click)="onStartClicked()">
|
<material-button id="run" (click)="onStartClicked()">
|
||||||
<span [ngSwitch]="engine.running">
|
<span [ngSwitch]="engine.isRunning">
|
||||||
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>
|
<material-icon *ngSwitchCase="false" icon="play_arrow" baseline></material-icon>
|
||||||
<material-icon *ngSwitchCase="true" icon="pause" baseline></material-icon>
|
<material-icon *ngSwitchCase="true" icon="pause" baseline></material-icon>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -41,4 +41,6 @@ class EngineService {
|
||||||
engine.clear();
|
engine.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get isRunning => engine.running;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue