@web-atoms/core
Version:
52 lines (51 loc) • 2.12 kB
JavaScript
System.register(["tslib", "../../../../App", "../../../../di/Inject", "../../../../services/NavigationService", "../../../../view-model/AtomViewModel", "../../../controls/AtomTabbedPage"], function (_export, _context) {
"use strict";
var __awaiter, __decorate, __metadata, __param, App, Inject, NavigationService, AtomViewModel, AtomTabbedPage, TabHost, TabHostViewModel;
_export("default", void 0);
return {
setters: [function (_tslib) {
__awaiter = _tslib.__awaiter;
__decorate = _tslib.__decorate;
__metadata = _tslib.__metadata;
__param = _tslib.__param;
}, function (_App) {
App = _App.App;
}, function (_diInject) {
Inject = _diInject.Inject;
}, function (_servicesNavigationService) {
NavigationService = _servicesNavigationService.NavigationService;
}, function (_viewModelAtomViewModel) {
AtomViewModel = _viewModelAtomViewModel.AtomViewModel;
}, function (_controlsAtomTabbedPage) {
AtomTabbedPage = _controlsAtomTabbedPage.AtomTabbedPage;
}],
execute: function () {
_export("default", TabHost = class TabHost extends AtomTabbedPage {
create() {
this.tabChannelName = "app";
this.viewModel = this.resolve(TabHostViewModel);
}
});
TabHostViewModel = class TabHostViewModel extends AtomViewModel {
constructor(app, nav) {
super(app);
this.nav = nav;
}
init() {
return __awaiter(this, void 0, void 0, function* () {
yield this.nav.openPage("tab://app/web-atoms-core/dist/web/samples/tabs/views/Page1", {
message: "Page 1",
title: "Page 1"
});
yield this.nav.openPage("tab://app/web-atoms-core/dist/web/samples/tabs/views/Page1", {
message: "Page 2",
title: "Page 2"
});
});
}
};
TabHostViewModel = __decorate([__param(0, Inject), __param(1, Inject), __metadata("design:paramtypes", [App, NavigationService])], TabHostViewModel);
}
};
});
//# sourceMappingURL=TabHost.js.map