(entry: string | NavigationEntry)
| 745 | } |
| 746 | |
| 747 | public replacePage(entry: string | NavigationEntry): void { |
| 748 | const currentBackstackEntry = this._currentEntry; |
| 749 | |
| 750 | if (typeof entry === 'string') { |
| 751 | const contextModuleName = sanitizeModuleName(entry); |
| 752 | entry = { moduleName: contextModuleName }; |
| 753 | } |
| 754 | |
| 755 | const newPage = Builder.createViewFromEntry(entry) as Page; |
| 756 | |
| 757 | const newBackstackEntry: BackstackEntry = { |
| 758 | entry: Object.assign({}, currentBackstackEntry.entry, entry), |
| 759 | resolvedPage: newPage, |
| 760 | navDepth: currentBackstackEntry.navDepth, |
| 761 | fragmentTag: currentBackstackEntry.fragmentTag, |
| 762 | frameId: currentBackstackEntry.frameId, |
| 763 | }; |
| 764 | |
| 765 | const navigationContext: NavigationContext = { |
| 766 | entry: newBackstackEntry, |
| 767 | isBackNavigation: false, |
| 768 | navigationType: NavigationType.replace, |
| 769 | }; |
| 770 | |
| 771 | this._navigationQueue.push(navigationContext); |
| 772 | this._processNextNavigationEntry(); |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | // Mark as a Frame with an unique Symbol |
no test coverage detected