@@ -12,6 +12,7 @@ import { sanitizeModuleName } from '../../utils/common';
1212import { profile } from '../../profiling' ;
1313import { FRAME_SYMBOL } from './frame-helpers' ;
1414import { SharedTransition } from '../transition/shared-transition' ;
15+ import { NavigationData } from '.' ;
1516
1617export { NavigationType } from './frame-interfaces' ;
1718export type { AndroidActivityCallbacks , AndroidFragmentCallbacks , AndroidFrame , BackstackEntry , NavigationContext , NavigationEntry , NavigationTransition , TransitionState , ViewEntry , iOSFrame } from './frame-interfaces' ;
@@ -256,6 +257,7 @@ export class FrameBase extends CustomLayoutView {
256257 }
257258
258259 public setCurrent ( entry : BackstackEntry , navigationType : NavigationType ) : void {
260+ const fromEntry = this . _currentEntry ;
259261 const newPage = entry . resolvedPage ;
260262
261263 // In case we navigated forward to a page that was in the backstack
@@ -274,11 +276,12 @@ export class FrameBase extends CustomLayoutView {
274276 }
275277
276278 newPage . onNavigatedTo ( isBack ) ;
277- this . notify ( {
279+ this . notify < NavigationData > ( {
278280 eventName : FrameBase . navigatedToEvent ,
279281 object : this ,
280282 isBack,
281283 entry,
284+ fromEntry,
282285 } ) ;
283286
284287 // Reset executing context after NavigatedTo is raised;
@@ -478,7 +481,7 @@ export class FrameBase extends CustomLayoutView {
478481 }
479482
480483 backstackEntry . resolvedPage . onNavigatingTo ( backstackEntry . entry . context , isBack , backstackEntry . entry . bindingContext ) ;
481- this . notify ( {
484+ this . notify < NavigationData > ( {
482485 eventName : FrameBase . navigatingToEvent ,
483486 object : this ,
484487 isBack,
0 commit comments