You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation-beta/doc.html
+4-11Lines changed: 4 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -58,25 +58,18 @@ <h3> SwallowJs Intro </h3>
58
58
<!--Build-->
59
59
<divid="tutorial_blog_firebase">
60
60
<h3>Build a Blog</h3>
61
-
<p>Get started with the <strong><ahref="/doc/blog">blog tutorial</a></strong> . You’ll learn the use of SwallowJs, and build a blog in the process.</p>
61
+
<p>Get started with the blog tutorial for both <ahref="/doc/tutorial-firebase"> Firebase </a> and your regular <ahref="/doc/tutorial-server-side"> Sever-side </a>. You’ll
62
+
learn the use of SwallowJs, and build a blog in the process. </p>
<p> Services are the heart of your application. storage and retrieval of your data read more on<ahref="/doc/services-firebase"> Firebase services </a> or
90
-
read more on <ahref="/doc/services-derver-side"> Server Side services </a>
83
+
read more on <ahref="/doc/services-server-side"> Server Side services </a>
<p>A statement begins with a pound and ends with a slash. That is, {{#data}} begins a person section, while {{/data}} ends it.</p>
118
+
<p> The behavior of the statement is determined by the value of the key <strong>False Values or Empty Lists</strong></p>
119
+
120
+
<p>If the data key does not exist, or exists and has a value of null, undefined, false, 0, or NaN, or is an empty string or an empty list, the block will not be rendered.</p>
121
+
<p>Data:</p>
122
+
{% highlight html %}
123
+
data = {
124
+
"person": false
125
+
}
126
+
{% endhighlight %}
127
+
<p>Template:</p>
128
+
129
+
<figureclass="highlight">
130
+
<pre>
131
+
Shown.<br>
132
+
{{ #data }} <br>
133
+
Never shown! <br>
134
+
{{ /data }} <br>
135
+
</pre>
136
+
</figure>
137
+
<p>Output:</p>
138
+
{% highlight html %}
139
+
Shown.
140
+
{% endhighlight %}
141
+
</div>
142
+
<br>
143
+
<h4> More Example </h4>
144
+
<p>If the value of a section variable is a function, it will be called in the context of the current item in the list on each iteration.</p>
<p>An inverted section opens with <code>{{^section}}</code> instead of <code>{{#section}}</code>. The block of an inverted section is rendered only if the value of that section's tag is null, undefined, false, falsy or an empty list.</p>
0 commit comments