Skip to content

Commit 99bd3a7

Browse files
refactor: tabview example. Removed webpack config
1 parent af2eaae commit 99bd3a7

File tree

7 files changed

+32
-265
lines changed

7 files changed

+32
-265
lines changed

.DS_Store

8 KB
Binary file not shown.

.ctags-exclude

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/.DS_Store

6 KB
Binary file not shown.

app/tab-view/tab-view.component.ts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
1-
import { Component } from "@angular/core";
1+
import { Component, OnInit } from "@angular/core";
22

33
@Component({
44
selector: "tab-view-component",
55
template: `
66
<Grid class="tab-view-container">
7-
<TabView sdkExampleTitle sdkToggleNavButton>
8-
<StackLayout *tabItem="{title: 'Overview'}" >
9-
<Label text="Test Label"></Label>
10-
</StackLayout>
11-
</TabView>
7+
<TabView>
8+
<StackLayout *tabItem="{ title: 'Tab1' }">
9+
<GridLayout>
10+
<Label *ngIf="isLoading" text="First tab item is still loading"></Label>
11+
<Label *ngIf="!isLoading" text="First tab item"></Label>
12+
</GridLayout>
13+
</StackLayout>
14+
<StackLayout *tabItem="{ title: 'Tab2' }">
15+
<Label text="Second tab item"></Label>
16+
</StackLayout>
17+
</TabView>
1218
</Grid>
1319
`,
1420
})
1521

16-
export class TabViewComponent {
22+
export class TabViewComponent implements OnInit {
23+
public isLoading: boolean = true;
24+
25+
public ngOnInit(): void {
26+
setTimeout(() => {
27+
this.isLoading = false;
28+
}, 500);
29+
}
1730
}

app/template/.DS_Store

6 KB
Binary file not shown.

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@
1313
}
1414
},
1515
"dependencies": {
16-
"@angular/common": "~6.0.0-rc.3",
17-
"@angular/compiler": "~6.0.0-rc.3",
18-
"@angular/core": "~6.0.0-rc.3",
19-
"@angular/forms": "~6.0.0-rc.3",
20-
"@angular/http": "~6.0.0-rc.3",
21-
"@angular/platform-browser": "~6.0.0-rc.3",
22-
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
23-
"@angular/router": "~6.0.0-rc.3",
16+
"@angular/common": "~6.0.0",
17+
"@angular/compiler": "~6.0.0",
18+
"@angular/core": "~6.0.0",
19+
"@angular/forms": "~6.0.0",
20+
"@angular/http": "~6.0.0",
21+
"@angular/platform-browser": "~6.0.0",
22+
"@angular/platform-browser-dynamic": "~6.0.0",
23+
"@angular/router": "~6.0.0",
2424
"nativescript-angular": "next",
2525
"nativescript-intl": "~3.0.0",
2626
"nativescript-theme-core": "^1.0.4",
2727
"reflect-metadata": "~0.1.8",
28-
"rxjs": "~6.0.0",
28+
"rxjs": "~6.0.0 || >=6.1.0 || >=6.0.0",
2929
"tns-core-modules": "next",
3030
"zone.js": "^0.8.4"
3131
},
3232
"devDependencies": {
3333
"@angular-devkit/core": "~0.5.5",
34-
"@angular/compiler-cli": "~6.0.0-rc.3",
35-
"@ngtools/webpack": "~6.0.0-rc.3",
34+
"@angular/compiler-cli": "~6.0.0",
35+
"@ngtools/webpack": "~6.0.0",
3636
"babel-traverse": "6.24.1",
3737
"babel-types": "6.24.1",
3838
"babylon": "6.17.0",
@@ -50,12 +50,10 @@
5050
"resolve-url-loader": "~2.3.0",
5151
"tslint": "^5.4.3",
5252
"typescript": "~2.7.2",
53-
"uglifyjs-webpack-plugin": "~1.2.4",
53+
"uglifyjs-webpack-plugin": "~1.1.6",
5454
"webpack": "~4.5.0",
5555
"webpack-bundle-analyzer": "^2.9.1",
5656
"webpack-sources": "~1.1.0",
57-
"uglifyjs-webpack-plugin": "~1.1.6",
58-
"clean-webpack-plugin": "~0.1.19",
5957
"webpack-cli": "~2.0.14"
6058
},
6159
"scripts": {

webpack.config.js

Lines changed: 0 additions & 241 deletions
This file was deleted.

0 commit comments

Comments
 (0)