platform/packages/jael/jael_web/lib/src/jael_component.dart

20 lines
555 B
Dart
Raw Normal View History

2019-03-23 18:49:37 +00:00
/// A annotation for components that source-gen their `render()` methods.
class Jael {
/// The raw template.
final String template;
/// The path to a [template].
final String templateUrl;
/// Whether to parse the [template] as `DSX`.
final bool asDsx;
const Jael({this.template, this.templateUrl, this.asDsx});
}
/// Shorthand for enabling `DSX` syntax when using a [Jael] annotation.
class Dsx extends Jael {
const Dsx({String template, String templateUrl})
: super(template: template, templateUrl: templateUrl, asDsx: true);
}