platform/packages/jael/jael_web/example/using_components.dart

27 lines
527 B
Dart
Raw Normal View History

2021-12-19 16:22:12 +00:00
import 'package:jael3_web/jael3_web.dart';
2019-03-23 22:02:57 +00:00
part 'using_components.g.dart';
@Jael(template: '''
<div>
<h1>Welcome to my app</h1>
<LabeledInput name="username" />
</div>
''')
class MyApp extends Component with _MyAppJaelTemplate {}
@Jael(template: '''
<div>
<label>
<b>{{name}}:</b>
</label>
<br>
<input name=name placeholder="Enter " + name + "..." type="text">
</div>
''')
class LabeledInput extends Component with _LabeledInputJaelTemplate {
2021-12-19 16:22:12 +00:00
@override
2021-06-20 12:37:20 +00:00
final String? name;
2019-03-23 22:02:57 +00:00
LabeledInput({this.name});
}