mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge branch 'ErjanGavalji/fix-snippet-language-tags'
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
To run tests please build using one of the *_Tests build configurations and call runAll() method of the Tests module. For example:
|
To run tests please build using one of the *_Tests build configurations and call runAll() method of the Tests module. For example:
|
||||||
|
|
||||||
##iOS
|
##iOS
|
||||||
```js
|
``` JavaScript
|
||||||
var app = require("application");
|
var app = require("application");
|
||||||
app.init(null);
|
app.init(null);
|
||||||
var tests = require("Tests");
|
var tests = require("Tests");
|
||||||
@ -9,7 +9,7 @@ tests.runAll();
|
|||||||
```
|
```
|
||||||
|
|
||||||
##Android
|
##Android
|
||||||
```js
|
``` JavaScript
|
||||||
app.init({
|
app.init({
|
||||||
getActivity: function(intent) {
|
getActivity: function(intent) {
|
||||||
return com.tns.NativeScriptActivity.extend({});
|
return com.tns.NativeScriptActivity.extend({});
|
||||||
@ -19,4 +19,4 @@ app.init({
|
|||||||
require("Tests").runAll();
|
require("Tests").runAll();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -107,7 +107,7 @@ export var test_fetch_response_status = function (done) {
|
|||||||
|
|
||||||
// <snippet module="fetch" title="fetch">
|
// <snippet module="fetch" title="fetch">
|
||||||
// ### Get Response status
|
// ### Get Response status
|
||||||
// ``` fetch
|
// ``` JavaScript
|
||||||
fetch("https://httpbin.org/get").then(function (response) {
|
fetch("https://httpbin.org/get").then(function (response) {
|
||||||
//// Argument (response) is Response!
|
//// Argument (response) is Response!
|
||||||
var statusCode = response.status;
|
var statusCode = response.status;
|
||||||
@ -228,4 +228,4 @@ export var test_fetch_post_json = function (done) {
|
|||||||
});
|
});
|
||||||
// ```
|
// ```
|
||||||
// </snippet>
|
// </snippet>
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ import absoluteLayoutModule = require("ui/layouts/absolute-layout");
|
|||||||
// </snippet>
|
// </snippet>
|
||||||
|
|
||||||
// ### Declaring a AbsoluteLayout.
|
// ### Declaring a AbsoluteLayout.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <AbsoluteLayout>
|
// <AbsoluteLayout>
|
||||||
// <Label text="This is Label 1" left="30" top="70" />
|
// <Label text="This is Label 1" left="30" top="70" />
|
||||||
|
@ -14,7 +14,7 @@ import dockModule = require("ui/layouts/dock-layout");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Declaring a DockLayout.
|
// ### Declaring a DockLayout.
|
||||||
//```XML
|
//``` XML
|
||||||
//<Page>
|
//<Page>
|
||||||
// <DockLayout stretchLastChild="true" >
|
// <DockLayout stretchLastChild="true" >
|
||||||
// <Button dock="left" text="left" style="background-color: red; margin: 5;"/ >/ >
|
// <Button dock="left" text="left" style="background-color: red; margin: 5;"/ >/ >
|
||||||
|
@ -171,7 +171,7 @@ export class StackLayoutTest extends testModule.UITest<StackLayout> {
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Declaring a StackLayout.
|
// ### Declaring a StackLayout.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <StackLayout orientation="horizontal">
|
// <StackLayout orientation="horizontal">
|
||||||
// <Label text="This is Label 1" />
|
// <Label text="This is Label 1" />
|
||||||
|
@ -28,7 +28,7 @@ export class WrapLayoutTest extends testModule.UITest<wrapLayoutModule.WrapLayou
|
|||||||
// </snippet>
|
// </snippet>
|
||||||
|
|
||||||
// ### Declaring a WrapLayout.
|
// ### Declaring a WrapLayout.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <WrapLayout>
|
// <WrapLayout>
|
||||||
// <Label text="This is Label 1" />
|
// <Label text="This is Label 1" />
|
||||||
|
@ -16,7 +16,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
// ```
|
// ```
|
||||||
//
|
//
|
||||||
// ## Setting Title and Icon
|
// ## Setting Title and Icon
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// {%raw%}<ActionBar title="{{ title }}" android.icon="res://is_custom_home_icon"/>{%endraw%}
|
// {%raw%}<ActionBar title="{{ title }}" android.icon="res://is_custom_home_icon"/>{%endraw%}
|
||||||
@ -28,7 +28,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// ## Setting Custom Title View
|
// ## Setting Custom Title View
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// <ActionBar title="Title">
|
// <ActionBar title="Title">
|
||||||
@ -46,7 +46,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
//```
|
//```
|
||||||
//
|
//
|
||||||
// ## Setting Action Items
|
// ## Setting Action Items
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// <ActionBar title="Title">
|
// <ActionBar title="Title">
|
||||||
@ -66,7 +66,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
// * **iOS** - `left` and `right`. The default is `left`.
|
// * **iOS** - `left` and `right`. The default is `left`.
|
||||||
//
|
//
|
||||||
// ## Displaying Platform-Specific System Icons on Action Items
|
// ## Displaying Platform-Specific System Icons on Action Items
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// <ActionBar>
|
// <ActionBar>
|
||||||
@ -119,7 +119,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
//For a full list of Android drawable names, please visit http://androiddrawables.com
|
//For a full list of Android drawable names, please visit http://androiddrawables.com
|
||||||
//
|
//
|
||||||
// ## Displaying Custom View in Action Items
|
// ## Displaying Custom View in Action Items
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// <ActionBar>
|
// <ActionBar>
|
||||||
@ -140,7 +140,7 @@ import actionBarModule = require("ui/action-bar");
|
|||||||
//```
|
//```
|
||||||
//
|
//
|
||||||
// ## Setting Navigation Button
|
// ## Setting Navigation Button
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Page.actionBar>
|
// <Page.actionBar>
|
||||||
// <ActionBar title="Title">
|
// <ActionBar title="Title">
|
||||||
@ -479,4 +479,4 @@ export function createPageAndNavigate() {
|
|||||||
helper.navigate(pageFactory);
|
helper.navigate(pageFactory);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import color = require("color");
|
|||||||
import activityIndicatorModule = require("ui/activity-indicator");
|
import activityIndicatorModule = require("ui/activity-indicator");
|
||||||
// ```
|
// ```
|
||||||
// ### Binding the activity indicator busy property to a view-model property.
|
// ### Binding the activity indicator busy property to a view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ActivityIndicator busy="{{ isLoading }}" />{%endraw%}
|
// {%raw%}<ActivityIndicator busy="{{ isLoading }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Declaring a Border.
|
// ### Declaring a Border.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Border borderRadius="10" borderWidth="1" borderColor="#FF0000">
|
// <Border borderRadius="10" borderWidth="1" borderColor="#FF0000">
|
||||||
// <Button text="OK"/>
|
// <Button text="OK"/>
|
||||||
|
@ -21,7 +21,7 @@ import observable = require("data/observable");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Attaching event handler for the button tap event.
|
// ### Attaching event handler for the button tap event.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <Button tap="buttonTap" />
|
// <Button tap="buttonTap" />
|
||||||
// </Page>
|
// </Page>
|
||||||
|
@ -13,7 +13,7 @@ import htmlViewModule = require("ui/html-view");
|
|||||||
|
|
||||||
// <snippet module="ui/html-view" title="HtmlView">
|
// <snippet module="ui/html-view" title="HtmlView">
|
||||||
// ### Declaring a HtmlView.
|
// ### Declaring a HtmlView.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<HtmlView html="{{ htmlString }}" />{%endraw%}
|
// {%raw%}<HtmlView html="{{ htmlString }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
@ -56,4 +56,4 @@ export var testLoadHTMLString = function () {
|
|||||||
} else if (htmlView.android) {
|
} else if (htmlView.android) {
|
||||||
TKUnit.assert(htmlView.android.getText(), "HTML string not loaded properly. Actual: " + htmlView.android.getText());
|
TKUnit.assert(htmlView.android.getText(), "HTML string not loaded properly. Actual: " + htmlView.android.getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import ImageModule = require("ui/image");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// Binding the image source property to a view-model property.
|
// Binding the image source property to a view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <StackLayout>
|
// <StackLayout>
|
||||||
// <!--Bind the image source property to view-model property -->
|
// <!--Bind the image source property to view-model property -->
|
||||||
@ -276,4 +276,4 @@ export var test_SettingStretch_none = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
helper.buildUIAndRunTest(image, testFunc);
|
helper.buildUIAndRunTest(image, testFunc);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import LabelModule = require("ui/label");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding the Label text property to a view-model property.
|
// ### Binding the Label text property to a view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<Label text="{{ title }}" />{%endraw%}
|
// {%raw%}<Label text="{{ title }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
|
@ -20,19 +20,19 @@ import labelModule = require("ui/label");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding the ListView items property to collection in the view-model.
|
// ### Binding the ListView items property to collection in the view-model.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ListView items="{{ myItems }}" />{%endraw%}
|
// {%raw%}<ListView items="{{ myItems }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Attaching event handler for the ListView itemTap event.
|
// ### Attaching event handler for the ListView itemTap event.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ListView items="{{ myItems }}" itemTap="listViewItemTap" />{%endraw%}
|
// {%raw%}<ListView items="{{ myItems }}" itemTap="listViewItemTap" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function listViewItemTap(args) {
|
// function listViewItemTap(args) {
|
||||||
// var itemIndex = args.index;
|
// var itemIndex = args.index;
|
||||||
// }
|
// }
|
||||||
@ -40,12 +40,12 @@ import labelModule = require("ui/label");
|
|||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Attaching event handler for the ListView loadMoreItems event.
|
// ### Attaching event handler for the ListView loadMoreItems event.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ListView items="{{ myItems }}" loadMoreItems="listViewLoadMoreItems" />{%endraw%}
|
// {%raw%}<ListView items="{{ myItems }}" loadMoreItems="listViewLoadMoreItems" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function listViewLoadMoreItems(args) {
|
// function listViewLoadMoreItems(args) {
|
||||||
// // Expand your collection bound to the ListView with more items here!
|
// // Expand your collection bound to the ListView with more items here!
|
||||||
// }
|
// }
|
||||||
@ -53,7 +53,7 @@ import labelModule = require("ui/label");
|
|||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Define the ListView itemTemplate property.
|
// ### Define the ListView itemTemplate property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ListView items="{{ myItems }}">
|
// {%raw%}<ListView items="{{ myItems }}">
|
||||||
// <ListView.itemTemplate>
|
// <ListView.itemTemplate>
|
||||||
|
@ -12,12 +12,12 @@ import placeholderModule = require("ui/placeholder");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// Creating native view for the Placeholder using creatingView event.
|
// Creating native view for the Placeholder using creatingView event.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<Placeholder creatingView="creatingView" />{%endraw%}
|
// {%raw%}<Placeholder creatingView="creatingView" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
//var platform = require("platform");
|
//var platform = require("platform");
|
||||||
//var utils = require("utils/utils");
|
//var utils = require("utils/utils");
|
||||||
//
|
//
|
||||||
@ -75,4 +75,4 @@ export function test_placeholder_will_not_crash_wihout_creatingView() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
helper.buildUIAndRunTest(p, testAction);
|
helper.buildUIAndRunTest(p, testAction);
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,12 @@ import progressModule = require("ui/progress");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// Binding the Progress value property to a view-model property.
|
// Binding the Progress value property to a view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// {%raw%}<Progress value="{{ someProperty }}" />{%endraw%}
|
// {%raw%}<Progress value="{{ someProperty }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function pageLoaded(args) {
|
// function pageLoaded(args) {
|
||||||
// var page = args.object;
|
// var page = args.object;
|
||||||
// page.bindingContext = { someProperty : 42 };
|
// page.bindingContext = { someProperty : 42 };
|
||||||
|
@ -23,14 +23,14 @@ import labelModule = require("ui/label");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding the Repeater items property to collection in the view-model.
|
// ### Binding the Repeater items property to collection in the view-model.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<Repeater items="{{ myItems }}" />{%endraw%}
|
// {%raw%}<Repeater items="{{ myItems }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Define the Repeater itemTemplate property.
|
// ### Define the Repeater itemTemplate property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<Repeater items="{{ myItems }}">
|
// {%raw%}<Repeater items="{{ myItems }}">
|
||||||
// <Repeater.itemTemplate>
|
// <Repeater.itemTemplate>
|
||||||
@ -41,7 +41,7 @@ import labelModule = require("ui/label");
|
|||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Define the Repeater itemsLayout property. Default is StackLayout with orientation="vertical".
|
// ### Define the Repeater itemsLayout property. Default is StackLayout with orientation="vertical".
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<Repeater items="{{ myItems }}">
|
// {%raw%}<Repeater items="{{ myItems }}">
|
||||||
// <Repeater.itemsLayout>
|
// <Repeater.itemsLayout>
|
||||||
@ -52,7 +52,7 @@ import labelModule = require("ui/label");
|
|||||||
//```
|
//```
|
||||||
|
|
||||||
// ### Repeater with WrapLayout inside ScrollView.
|
// ### Repeater with WrapLayout inside ScrollView.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<ScrollView>
|
// {%raw%}<ScrollView>
|
||||||
// <Repeater items="{{ myItems }}">
|
// <Repeater items="{{ myItems }}">
|
||||||
|
@ -14,7 +14,7 @@ import scrollViewModule = require("ui/scroll-view");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Declaring the ScrollView.
|
// ### Declaring the ScrollView.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <ScrollView>
|
// <ScrollView>
|
||||||
// {%raw%}<Image src="{{ someBigImageUrl }}" />{%endraw%}
|
// {%raw%}<Image src="{{ someBigImageUrl }}" />{%endraw%}
|
||||||
|
@ -13,7 +13,7 @@ import searchBarModule = require("ui/search-bar");
|
|||||||
// </snippet>
|
// </snippet>
|
||||||
|
|
||||||
// ### Declaring a SearchBar.
|
// ### Declaring a SearchBar.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <SearchBar text="{{ search }}" />
|
// <SearchBar text="{{ search }}" />
|
||||||
// </Page>
|
// </Page>
|
||||||
@ -87,4 +87,4 @@ export function test_DummyTestForSnippetOnly() {
|
|||||||
});
|
});
|
||||||
// ```
|
// ```
|
||||||
// </snippet>
|
// </snippet>
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ function _createSegmentedBar(): segmentedBarModule.SegmentedBar {
|
|||||||
// ``` JavaScript
|
// ``` JavaScript
|
||||||
var segmentedBar = new segmentedBarModule.SegmentedBar();
|
var segmentedBar = new segmentedBarModule.SegmentedBar();
|
||||||
// ```
|
// ```
|
||||||
// ``` xml
|
// ``` XML
|
||||||
// <SegmentedBar>
|
// <SegmentedBar>
|
||||||
// <SegmentedBar.items>
|
// <SegmentedBar.items>
|
||||||
// <SegmentedBarItem title="Item 1" />
|
// <SegmentedBarItem title="Item 1" />
|
||||||
|
@ -15,7 +15,7 @@ import sliderModule = require("ui/slider");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding the Progress and Slider value properties to a observable view-model property.
|
// ### Binding the Progress and Slider value properties to a observable view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// <StackLayout orientation="vertical">
|
// <StackLayout orientation="vertical">
|
||||||
// {%raw%}<Progress value="{{ someProperty }}" />
|
// {%raw%}<Progress value="{{ someProperty }}" />
|
||||||
@ -23,7 +23,7 @@ import sliderModule = require("ui/slider");
|
|||||||
// </StackLayout>
|
// </StackLayout>
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function pageLoaded(args) {
|
// function pageLoaded(args) {
|
||||||
// var page = args.object;
|
// var page = args.object;
|
||||||
// var obj = new observable.Observable();
|
// var obj = new observable.Observable();
|
||||||
|
@ -13,7 +13,7 @@ import switchModule = require("ui/switch");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding the Switch checked property and Button isEanbled property to a observable view-model property.
|
// ### Binding the Switch checked property and Button isEanbled property to a observable view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// <StackLayout orientation="vertical">
|
// <StackLayout orientation="vertical">
|
||||||
// {%raw%}<Switch checked="{{ someProperty }}" />
|
// {%raw%}<Switch checked="{{ someProperty }}" />
|
||||||
@ -21,7 +21,7 @@ import switchModule = require("ui/switch");
|
|||||||
// </StackLayout>
|
// </StackLayout>
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function pageLoaded(args) {
|
// function pageLoaded(args) {
|
||||||
// var page = args.object;
|
// var page = args.object;
|
||||||
// var obj = new observable.Observable();
|
// var obj = new observable.Observable();
|
||||||
|
@ -9,7 +9,7 @@ import tabViewTestsNative = require("./tab-view-tests-native");
|
|||||||
// # TabView
|
// # TabView
|
||||||
|
|
||||||
// ### Declaring the TabView in xml.
|
// ### Declaring the TabView in xml.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// <TabView>
|
// <TabView>
|
||||||
// <TabView.items>
|
// <TabView.items>
|
||||||
|
@ -21,7 +21,7 @@ import observable = require("data/observable");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding two TextFields text property to observable view-model property.
|
// ### Binding two TextFields text property to observable view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// <StackLayout orientation="vertical">
|
// <StackLayout orientation="vertical">
|
||||||
// {%raw%}<TextField text="{{ someProperty }}" />
|
// {%raw%}<TextField text="{{ someProperty }}" />
|
||||||
@ -29,7 +29,7 @@ import observable = require("data/observable");
|
|||||||
// </StackLayout>
|
// </StackLayout>
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function pageLoaded(args) {
|
// function pageLoaded(args) {
|
||||||
// var page = args.object;
|
// var page = args.object;
|
||||||
// var obj = new observable.Observable();
|
// var obj = new observable.Observable();
|
||||||
|
@ -21,7 +21,7 @@ import observable = require("data/observable");
|
|||||||
// ```
|
// ```
|
||||||
|
|
||||||
// ### Binding two TextViews text property to observable view-model property.
|
// ### Binding two TextViews text property to observable view-model property.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page loaded="pageLoaded">
|
// <Page loaded="pageLoaded">
|
||||||
// <StackLayout orientation="vertical">
|
// <StackLayout orientation="vertical">
|
||||||
// {%raw%}<TextView text="{{ someProperty }}" />
|
// {%raw%}<TextView text="{{ someProperty }}" />
|
||||||
@ -29,7 +29,7 @@ import observable = require("data/observable");
|
|||||||
// </StackLayout>
|
// </StackLayout>
|
||||||
// </Page>
|
// </Page>
|
||||||
//```
|
//```
|
||||||
//```JS
|
//``` JavaScript
|
||||||
// function pageLoaded(args) {
|
// function pageLoaded(args) {
|
||||||
// var page = args.object;
|
// var page = args.object;
|
||||||
// var obj = new observable.Observable();
|
// var obj = new observable.Observable();
|
||||||
|
@ -11,7 +11,7 @@ import webViewModule = require("ui/web-view");
|
|||||||
|
|
||||||
// <snippet module="ui/web-view" title="WebView">
|
// <snippet module="ui/web-view" title="WebView">
|
||||||
// ### Declaring a WebView.
|
// ### Declaring a WebView.
|
||||||
//```XML
|
//``` XML
|
||||||
// <Page>
|
// <Page>
|
||||||
// {%raw%}<WebView src="{{ someUrl | pathToLocalFile | htmlString }}" />{%endraw%}
|
// {%raw%}<WebView src="{{ someUrl | pathToLocalFile | htmlString }}" />{%endraw%}
|
||||||
// </Page>
|
// </Page>
|
||||||
|
Reference in New Issue
Block a user