Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit 721ea3c

Browse files
author
Vladimir Enchev
committed
class and on events added
1 parent 6367b30 commit 721ea3c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ui-with-xml.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The user interface of NativeScript mobile apps consists of pages. Typically, the
3535
* [Platform specific property value](#platform-specific-property-value)
3636
* [Platform specific component declaration](#platform-specific-component-declaration)
3737
* [Lower-case-dashed component declaration](#lower-case-dashed-component-declaration)
38+
* [HTML like syntax](#html-like-syntax)
3839

3940
## The Basics
4041

@@ -768,7 +769,16 @@ Since NativeScript 1.3 you can declare your UI using lower-case-dashed syntax:
768769
<page>
769770
<scroll-view>
770771
<stack-layout>
771-
<label ctext="Label" />
772+
<label text="Label" />
772773
<button text="Button" tap="tap" />
773774
...
774775
```
776+
777+
## HTML like syntax
778+
Since NativeScript 1.4 you can use familiar HTML syntax like `class` for CSS class and events with `on` prefix:
779+
```XML
780+
<page>
781+
<stack-layout>
782+
<button text="Button" ontap="tap" class="myButton" />
783+
...
784+
```

0 commit comments

Comments
 (0)