UNPKG

ionic-framework

Version:
76 lines 3.79 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var router_1 = require('angular2/router'); var ionic_1 = require('ionic/ionic'); var View1Cmp = (function () { function View1Cmp(location, viewCtrl) { this.path = location.path(); this.viewCtrl = viewCtrl; console.log("View1Cmp, path: " + this.path); } View1Cmp.prototype.onPageDidEnter = function () { this.windowHash = window.location.hash; }; View1Cmp = __decorate([ ionic_1.Page({ templateUrl: 'view1.html' }), __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Location !== 'undefined' && router_1.Location) === 'function' && _a) || Object, (typeof (_b = typeof ionic_1.ViewController !== 'undefined' && ionic_1.ViewController) === 'function' && _b) || Object]) ], View1Cmp); return View1Cmp; var _a, _b; })(); var View2Cmp = (function () { function View2Cmp(location, viewCtrl) { this.path = location.path(); this.viewCtrl = viewCtrl; console.log("View2Cmp, path: " + this.path); } View2Cmp.prototype.onPageDidEnter = function () { this.windowHash = window.location.hash; }; View2Cmp = __decorate([ ionic_1.Page({ templateUrl: 'view2.html' }), __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Location !== 'undefined' && router_1.Location) === 'function' && _a) || Object, (typeof (_b = typeof ionic_1.ViewController !== 'undefined' && ionic_1.ViewController) === 'function' && _b) || Object]) ], View2Cmp); return View2Cmp; var _a, _b; })(); var View3Cmp = (function () { function View3Cmp(params, location, viewCtrl) { this.id = params.get('id'); this.path = location.path(); this.viewCtrl = viewCtrl; console.log("View3Cmp, path: " + this.path + ", param id: " + this.id); } View3Cmp.prototype.onPageDidEnter = function () { this.windowHash = window.location.hash; }; View3Cmp = __decorate([ ionic_1.Page({ templateUrl: 'view3.html' }), __metadata('design:paramtypes', [(typeof (_a = typeof ionic_1.NavParams !== 'undefined' && ionic_1.NavParams) === 'function' && _a) || Object, (typeof (_b = typeof router_1.Location !== 'undefined' && router_1.Location) === 'function' && _b) || Object, (typeof (_c = typeof ionic_1.ViewController !== 'undefined' && ionic_1.ViewController) === 'function' && _c) || Object]) ], View3Cmp); return View3Cmp; var _a, _b, _c; })(); var InboxApp = (function () { function InboxApp(location) { this.location = location; } InboxApp = __decorate([ ionic_1.App(), router_1.RouteConfig([ { path: '/', component: View1Cmp, as: 'First' }, { path: '/2', component: View2Cmp, as: 'Second' }, { path: '/3/:id', component: View3Cmp, as: 'Third' } ]), __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Location !== 'undefined' && router_1.Location) === 'function' && _a) || Object]) ], InboxApp); return InboxApp; var _a; })();