Skip to content
This repository was archived by the owner on Oct 22, 2018. It is now read-only.

Commit 99dfd48

Browse files
committed
Add click event to inspect NativeScript issues with lazy loading
1 parent 2194de9 commit 99dfd48

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

src/app/about/components/about/about.component.tns.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Button class="ion-icon" text="{{ '\uF30C' }}" [nsRouterLink]="['/home']" clearHistory="true"></Button>
66
</ActionItem>
77
</ActionBarExtension>
8-
<GridLayout rows="auto, *">
8+
<StackLayout>
99
<Label class="h1 title" text="About me!"></Label>
10-
</GridLayout>
10+
</StackLayout>
1111
</Page>

src/app/app.component.tns.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
<GridLayout rows="auto, *">
2-
<ActionBar title="NativeScript Mobile App, yay!">
3-
</ActionBar>
4-
<StackLayout class="container" row="1">
5-
<page-router-outlet></page-router-outlet>
6-
</StackLayout>
7-
</GridLayout>
1+
<ActionBar title="NativeScript Mobile App, yay!">
2+
</ActionBar>
3+
<StackLayout class="container" row="1">
4+
<router-outlet></router-outlet>
5+
</StackLayout>

src/app/home/components/home/home.component.tns.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Page xmlns:Card="nativescript-cardview">
22
<ActionBarExtension>
33
<ActionItem ios.position="right">
4-
<Button class="ion-icon" [nsRouterLink]="['/about']" text="{{ '\uf41a' }}" pageTransition="flip"></Button>
4+
<Button class="ion-icon" [nsRouterLink]="['/about']" text="{{ '\uf41a' }}"></Button>
55
</ActionItem>
66
</ActionBarExtension>
77
<scroll-view>
@@ -10,7 +10,7 @@
1010
<StackLayout row="1">
1111
<Card:CardView class="cardStyle" radius="10" elevation="50" margin="20">
1212
<grid-layout rows="*, *, *" columns="*, *, *">
13-
<Image src="http://ionicframework.com/img/home/cta-iphone-2.png" margin="20" stretch="aspectFill" colSpan="3" row="0"></Image>
13+
<Image (click)="openPage()" src="http://ionicframework.com/img/home/cta-iphone-2.png" margin="20" stretch="aspectFill" colSpan="3" row="0"></Image>
1414
<TextView class="description" editable="false" text="The most popular template to create web (Ionic) and native (NativeScript) mobile apps!" textWrap="true" row="1" colSpan="3"></TextView>
1515
<Button text="Favorite" tap="goAway" row="3" col="0"></Button>
1616
<Button text="Listen" row="3" col="1"></Button>

src/app/home/components/home/home.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2+
import { Router } from '@angular/router';
23

34
@Component({
45
moduleId: module.id,
@@ -8,10 +9,19 @@ import { Component, OnInit } from '@angular/core';
89
})
910
export class HomeComponent implements OnInit {
1011

11-
constructor() { }
12+
constructor(private _router: Router) {}
1213

1314
ngOnInit() {
15+
16+
}
1417

18+
openPage(url) {
19+
let options = {
20+
title: "Race selection",
21+
message: "Race chosen: Unicorn",
22+
okButtonText: "OK"
23+
};
24+
alert(options);
1525
}
1626

1727
}

0 commit comments

Comments
 (0)