|
|
|
import { Component } from "@angular/core";
|
|
|
|
|
|
|
|
import { Platform } from "@ionic/angular";
|
|
|
|
import { SplashScreen } from "@ionic-native/splash-screen/ngx";
|
|
|
|
import { StatusBar } from "@ionic-native/status-bar/ngx";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-root",
|
|
|
|
templateUrl: "app.component.html",
|
|
|
|
styleUrls: ["app.component.scss"]
|
|
|
|
})
|
|
|
|
export class AppComponent {
|
|
|
|
public appPages = [
|
|
|
|
{
|
|
|
|
title: "Home",
|
|
|
|
url: "/home",
|
|
|
|
icon: "home"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "List",
|
|
|
|
url: "/list",
|
|
|
|
icon: "list"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Editor",
|
|
|
|
url: "/editor",
|
|
|
|
icon: "edit"
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
public nodes = [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
name: "root1",
|
|
|
|
children: [
|
|
|
|
{ id: 2, name: "child1" },
|
|
|
|
{ id: 3, name: "child2" }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 4,
|
|
|
|
name: "root2",
|
|
|
|
children: [
|
|
|
|
{ id: 5, name: "child2.1" },
|
|
|
|
{
|
|
|
|
id: 6,
|
|
|
|
name: "child2.2",
|
|
|
|
children: [{ id: 7, name: "subsub" }]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
private platform: Platform,
|
|
|
|
private splashScreen: SplashScreen,
|
|
|
|
private statusBar: StatusBar
|
|
|
|
) {
|
|
|
|
this.initializeApp();
|
|
|
|
}
|
|
|
|
|
|
|
|
initializeApp() {
|
|
|
|
this.platform.ready().then(() => {
|
|
|
|
this.statusBar.styleDefault();
|
|
|
|
this.splashScreen.hide();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|