本文整理汇总了TypeScript中tns-core-modules/ui/page.Page.on方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Page.on方法的具体用法?TypeScript Page.on怎么用?TypeScript Page.on使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tns-core-modules/ui/page.Page
的用法示例。
在下文中一共展示了Page.on方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: waitUntilNavigatedTo
export function waitUntilNavigatedTo(page: Page, action: Function) {
let completed = false;
function navigatedTo(args) {
args.object.page.off("navigatedTo", navigatedTo);
completed = true;
}
page.on("navigatedTo", navigatedTo);
action();
TKUnit.waitUntilReady(() => completed, 5);
}
示例2: constructor
constructor(private _page: Page, private _router: Router, private _optionsService: OptionsService) {
super();
if (applicationModule.ios) {
this._page.on("navigatingTo", this.onNavigatingTo, this);
this._optionsParamName = "selectionMode";
this._optionsService.paramName = this._optionsParamName;
this.router = _router;
this.navigationParameters = { selectedIndex: 0, paramName: this._optionsParamName, items: ["None", "Single", "Multiple", "Range"] };
}
this._selectionMode = CalendarSelectionMode.None;
}
开发者ID:telerik,项目名称:nativescript-ui-samples-angular,代码行数:11,代码来源:calendar-selection-modes.component.ts
示例3: constructor
constructor(private page: Page) {
if (this.page) {
this.page.actionBarHidden = true;
this.page.on("loaded", () => {
if (this.pageRouterOutlet && this.page.frame) {
this.pageRouterOutlet.setActionBarVisibility(this.page.frame.actionBarVisibility);
}
});
}
}
示例4: constructor
constructor(private _page: Page,
private _optionsService: OptionsService, private _router: Router) {
super();
if (applicationModule.ios) {
this._page.on("navigatingTo", this.onNavigatingTo, this);
this._optionsParamName = "eventsViewMode";
this._optionsService.paramName = this._optionsParamName;
this.router = _router;
this.navigationParameters = { selectedIndex: 1, paramName: this._optionsParamName, items: ["Week", "Month", "Month names", "Year", "Day"] };
}
this._viewMode = CalendarViewMode.Month;
}
示例5: constructor
constructor(private _page: Page,
private _optionsService: OptionsService, private _router: Router, private _changeDetectionRef: ChangeDetectorRef, private _dataService: DataService) {
super();
if (applicationModule.ios) {
this._page.on("navigatingTo", this.onNavigatingTo, this);
this._optionsParamName = "stackMode";
this._optionsService.paramName = this._optionsParamName;
this.router = _router;
this._optionsItems = ["Stack", "Stack 100", "None"];
this.navigationParameters = { selectedIndex: 1, paramName: this._optionsParamName, items: this._optionsItems };
}
}
示例6: constructor
constructor(private _page: Page, private _calendarService: CalendarEventsService,
private _optionsService: OptionsService, private _router: Router) {
super();
if (applicationModule.ios) {
this._page.on("navigatingTo", this.onNavigatingTo, this);
this._optionsParamName = "eventsViewMode";
this._optionsService.paramName = this._optionsParamName;
this.router = _router;
this.navigationParameters = { selectedIndex: 0, paramName: this._optionsParamName, items: ["None", "Inline", "Popover (iPad only)"] };
}
this._eventsViewMode = CalendarEventsViewMode.None;
}
开发者ID:telerik,项目名称:nativescript-ui-samples-angular,代码行数:12,代码来源:calendar-events-view-modes.component.ts
示例7: Page
create: () => {
const page = new Page();
page.content = stack;
messageContainer.focus();
page.style.fontSize = 11;
if (platform.isAndroid) {
page.on('navigatedTo', () => {
messageContainer.focus();
setTimeout(() => messageContainer.dismissSoftInput());
});
}
return page;
},
示例8: constructor
constructor(private _page: Page, private _optionsService: OptionsService, private _router: Router) {
super();
if (applicationModule.ios) {
this._page.on("navigatingTo", this.onNavigatingTo, this);
this._optionsParamName = "transitionMode";
this._optionsService.paramName = this._optionsParamName;
this.router = _router;
this.navigationParameters = {
selectedIndex: 0, paramName: this._optionsParamName,
items: ["None", "Slide", "Stack", "Flip", "Fold", "Float", "Rotate"]
};
}
this._transitionMode = CalendarTransitionMode.None;
}
开发者ID:telerik,项目名称:nativescript-ui-samples-angular,代码行数:14,代码来源:calendar-transition-modes.component.ts
示例9: createPage
export function createPage() {
var stackLayout = new stackLayoutModule.StackLayout();
var label = new labelModule.Label();
label.text = "CONSOLE MODULE";
var textView = new textViewModule.TextView();
textView.text = "Check out the console output.";
stackLayout.addChild(label);
stackLayout.addChild(textView);
var page = new pageModule.Page();
page.on(pageModule.Page.loadedEvent, function () {
pageLoaded();
});
page.content = stackLayout;
return page;
}
示例10: constructor
constructor(public params: ModalDialogParams, private page: Page) {
page.on("shownModally", () => {
const result = this.params.context;
this.params.closeCallback(result);
});
}