本文整理汇总了TypeScript中tns-core-modules/ui/frame.Frame.navigate方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Frame.navigate方法的具体用法?TypeScript Frame.navigate怎么用?TypeScript Frame.navigate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tns-core-modules/ui/frame.Frame
的用法示例。
在下文中一共展示了Frame.navigate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test_frame_retrieval_API_when_navigating
export function test_frame_retrieval_API_when_navigating() {
const rootView = getRootView();
const initialFrame = new Frame();
initialFrame.id = "initialFrame";
initialFrame.navigate(() => new Page());
const initialTopmost = topmost();
const initialFrameById = getFrameById("initialFrame");
TKUnit.assertEqual(initialTopmost, initialFrame);
TKUnit.assertEqual(initialFrameById, initialFrame);
const newFrame = new Frame();
newFrame.id = "newFrame";
newFrame.navigate(() => new Page());
const newTopmost = topmost();
const newFrameById = getFrameById("newFrame");
TKUnit.assertEqual(newTopmost, newFrame);
TKUnit.assertEqual(newFrameById, newFrame);
initialFrame.navigate(() => new Page());
const previousTopmost = topmost();
const previousFrameById = getFrameById("initialFrame");
TKUnit.assertEqual(previousTopmost, initialFrame);
TKUnit.assertEqual(previousFrameById, initialFrame);
// clean up the frame stack
initialFrame._removeFromFrameStack();
newFrame._removeFromFrameStack();
}
示例2: createFrame
function createFrame(i: number, page: Page) {
const frame = new Frame();
frame.navigate(() => page);
frame.id = `Tab${i} Frame${i}`;
return frame;
}
示例3: topmost
exports.secondaryActionTap = args => {
googleAnalytics.logEvent({
category: "Basic Actions",
action: "Click",
label: "Secondary Button"
});
const topmostFrame: Frame = topmost();
topmostFrame.navigate("secondary-page");
};
示例4: tearDownModule
export function tearDownModule() {
const page = new Page();
const frame = new Frame();
frame.navigate(() => page);
const entry: NavigationEntry = {
create: () => frame
};
waitUntilNavigatedToMaxTimeout([page], () => _resetRootView(entry));
}
示例5: onModalFrame
export function onModalFrame(args: EventData) {
const view = args.object as View;
const frame = new Frame();
frame.navigate("modal/modal-page");
view.showModal(frame,
"context",
() => console.log("home-page modal frame closed"),
false);
}
示例6: createTestFrameRootEntry
function createTestFrameRootEntry() {
const page = new Page();
const frameRoot = new Frame();
frameRoot.navigate(() => page);
const entry: NavigationEntry = {
create: () => frameRoot
};
return {
entry: entry,
root: frameRoot,
page: page
};
}
示例7: function
btnActivity.on(button.Button.tapEvent, function () {
var newFrame = new frame.Frame();
var newPage = "tests/pages/navigation/pageA-new-activity";
newFrame.navigate(newPage);
});