Skip to content

Commit 668d9ff

Browse files
author
Fatme
authored
Merge pull request #34 from NativeScript/fatme/fix-ts-projects
fix: add bundle-main-page.ts in order to work correctly with `ts` project
2 parents d8cdbda + fddec92 commit 668d9ff

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

bundle-app-root.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<Frame defaultPage="main-page" id="root-frame">
1+
<Frame defaultPage="bundle-main-page" id="root-frame">
22
</Frame>

bundle-main-page.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import vmModule = require("./main-view-model");
2+
function pageLoaded(args) {
3+
var page = args.object;
4+
page.bindingContext = vmModule.mainViewModel;
5+
}
6+
exports.pageLoaded = pageLoaded;

bundle-main-page.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="pageLoaded">
2+
<GridLayout cssClass="landingContainer">
3+
<Image src="{{ imageSrc }}" stretch="none" cssClass="landingBackground"/>
4+
5+
<Label text="{{ serverInfo }}" cssClass="landingText"/>
6+
</GridLayout>
7+
</Page>

0 commit comments

Comments
 (0)