Move App HTML into Separate Template
This commit is contained in:
parent
3780e61453
commit
843dad6cbb
3 changed files with 14 additions and 14 deletions
|
@ -5,19 +5,6 @@ import 'package:rules_of_living/src/App.dart';
|
||||||
|
|
||||||
@Component(
|
@Component(
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: '''
|
|
||||||
<h1>Cellular Automata - The Rules of Life</h1>
|
|
||||||
<div id="output">
|
|
||||||
<canvas #caCanvas width="500" height="500"></canvas>
|
|
||||||
</div>
|
|
||||||
<div id="controls">
|
|
||||||
<button id="run">Run</button>
|
|
||||||
<button id="step">Step</button>
|
|
||||||
<button id="reset">Reset</button>
|
|
||||||
<button id="random">Random</button>
|
|
||||||
<input id="speed" title="Speed" value="1">
|
|
||||||
</div>
|
|
||||||
''',
|
|
||||||
)
|
)
|
||||||
class AppComponent implements OnInit {
|
class AppComponent implements OnInit {
|
||||||
var name = "World";
|
var name = "World";
|
||||||
|
|
14
lib/app_component.html
Normal file
14
lib/app_component.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<h1>Cellular Automata - The Rules of Life</h1>
|
||||||
|
<div id="rules-input">
|
||||||
|
Ruleset: <input type="text" title="ruleset" content="S23/B3">
|
||||||
|
</div>
|
||||||
|
<div id="output">
|
||||||
|
<canvas #caCanvas width="500" height="500"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="controls">
|
||||||
|
<button id="run" >Run</button>
|
||||||
|
<button id="step">Step</button>
|
||||||
|
<button id="reset">Reset</button>
|
||||||
|
<button id="random">Random</button>
|
||||||
|
Speed: <input type="text" title="speed" value="1">
|
||||||
|
</div>
|
|
@ -1,6 +1,5 @@
|
||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
|
|
||||||
import 'package:rules_of_living/src/Cell.dart';
|
|
||||||
import 'package:rules_of_living/src/Grid.dart';
|
import 'package:rules_of_living/src/Grid.dart';
|
||||||
|
|
||||||
class App {
|
class App {
|
||||||
|
|
Loading…
Reference in a new issue