Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/app/ui/text-field/text-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ previous_url: /ApiReference/ui/text-field/HOW-TO
# TextField
Using a TextField requires the text-field module.
{%snippet require-textfield%}
{%snippet require-observable-textfield%}
### Binding two TextFields text property to observable view-model property.
```XML
<Page loaded="pageLoaded">
Expand Down
14 changes: 7 additions & 7 deletions tests/app/ui/text-view/text-view-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import * as observable from "tns-core-modules/data/observable";
// </Page>
// << text-view-xml
// >> observable-declare
// function pageLoaded(args) {
// var page = args.object;
// var obj = new observable.Observable();
// obj.set("someProperty", "Please change this text!");
// page.bindingContext = obj;
// }
// exports.pageLoaded = pageLoaded;
export function pageLoaded(args) {
let page = args.object;
let obj = new observable.Observable();
obj.set("someProperty", "Please change this text!");
page.bindingContext = obj;
}
exports.pageLoaded = pageLoaded;
// << observable-declare

var _createTextViewFunc = function (): textViewModule.TextView {
Expand Down
10 changes: 8 additions & 2 deletions tests/app/ui/text-view/text-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ previous_url: /ApiReference/ui/text-view/HOW-TO
# TextView
Using a TextView requires the text-view module.
{%snippet require-textmodules%}
{%snippet require-observable-textview%}
### Binding two TextViews text property to observable view-model property.
{%snippet text-view-xml%}
```XML
<Page loaded="pageLoaded">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid having snippets directly in mark-down. They are not subject to any validation this way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've agreed that this should stay inline for now

<StackLayout orientation="vertical">
{%raw%}<TextView text="{{ someProperty }}" />
<TextView text="{{ someProperty }}" />{%endraw%}
</StackLayout>
</Page>
```
{%snippet observable-declare%}
### Creating a TextView
{%snippet text-view-create%}
Expand Down