-
Notifications
You must be signed in to change notification settings - Fork 12
/
example.hbs
81 lines (69 loc) · 1.78 KB
/
example.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<AngleBraketComponent
@mustache={{@bla}}
@number=123
@string="example handles > sigil"
data-test-id="test"
class="my-class" as |test|>
Some Text
<div>{{test.someValue}}</div>
<test.component teste="asdfads"></test.component>
</AngleBraketComponent>
<HelloAngleBrackets @prop={{test}} />
<AngleBrackets::-Components::Nested />
<div class="my-css-class">{{test}}</div>
<span
class="
some class
{{if (helper-name this.condition)
"classes if true"
"classes if false"
}}
"></span>
<Nested::Component
@arg={{12}}
@doAction={{fn this.someAction 120}}
@argB={{hash
foo="string"
bar=true
baz=120
yolo=(array 12 "string" (hash foo=this.something))
bax=(fn this.someAction 120)
}}
as |foo|
>
<:default>
named blocks {{false}}
</:default>
<:block as |foo, baz|>
{{foo}}
{{#let foo.bar as |fooBar|}}
<fooBar>
{{/let}}
<baz.component />
</:block>
</Nested::Component>
{{#block-component property=@value prop-erty=this.value string="testing"
onClick=(action "someAction" withParam) as |returnValue|}}
{{#each-in foo as |bar, baz|}}
{{inline-component foo=bar}}
{{else if value}}
{{else with foo}}
\{{escaped handlebars}}
{{else}}
{{! comment }}
{{!-- block }}
TODO: Indentation is broken after that
comment --}}
<a href class="{{if inside 'still highlight'}}"
onclick={{action foo}}>
{{escaped}}
{{{unescaped}}}
</a>
<MyIput type="text" oninput={{action (mut fooBar) value="target.value"}} />
<input type="text" oninput={{action (mut (fn fooBar 200)) value="target.value"}}>
<input {{on 'input' (fn this.doSomething 12 "string")}}
{{helper "string" 123}}
{{input value="foo"}}
{{textarea}}
{{/each-in}}
{{/block-component}}