Every line of 'this router navigate' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
237 public routerNavigate(route: string, view?: string): void { 238 this.router.navigateToRoute(route, { 239 diagramName: this.activeDiagram ? this.activeDiagram.name : undefined, 240 solutionUri: this.activeSolutionEntry ? this.activeSolutionEntry.uri : undefined, 241 view: view, 242 }); 243 }
2 navigate(url: string) { 3 return url; 4 }
211 _navigate(path, route, params, queryParams) { 212 const context = {path, route, params, queryParams}; 213 214 const triggersEnter = [ 215 ...this._triggersEnter, 216 ...route._triggersEnter 217 ]; 218 const redirectArgs = this._runTriggers(triggersEnter, context); 219 220 if (redirectArgs) { 221 return this.go(...redirectArgs); 222 } 223 224 // Set the current context 225 const oldContext = this._current; 226 this._current = context; 227 228 const useReplaceState = this.env.replaceState.get(); 229 const urlState = {path, params, queryParams}; 230 if (useReplaceState) { 231 history.replaceState(urlState, window.title, path); 232 } else { 233 history.pushState(urlState, window.title, path); 234 } 235 236 // Run exit handlers 237 if (oldContext && oldContext.route) { 238 const triggersExit = [ 239 ...this._triggersExit, 240 ...oldContext.route._triggersExit 241 ]; 242 const exitRedirectArgs = this._runTriggers(triggersExit, oldContext); 243 244 if (exitRedirectArgs) { 245 return this.go(...exitRedirectArgs); 246 } 247 } 248 249 this._applyRoute(); 250 }
13 function navigate(routeName, params) { 14 _navigator.dispatch(NavigationActions.navigate({ 15 routeName, 16 params, 17 })); 18 }
35 navigate(params: NavParams) { 36 this.navSubject.next(params); 37 }
13 navigate(arr) { 14 TestBed.get(Location).go(arr[0]); 15 }
29 static init(router: VueRouter) { 30 this.router = router; 31 }
188 goBack() { 189 this._history.goBack() 190 return this._done() 191 }
116 navigate(path: string, replace?: boolean, state?) { 117 this._calculatePath(path); 118 if (history && this.mode == NavigationMap.HISTORY_MODE) { 119 if (replace) 120 history.replaceState(state, "", this.currentPath); 121 else 122 history.pushState(state, "", this.currentPath); 123 } 124 this.triggerActions(); 125 }
40 navigate(url: Tree): Promise { 41 this._urlTree = url; 42 return recognize(this._componentResolver, this._componentType, url) 43 .then(currTree => { 44 let prevRoot = isPresent(this._prevTree) ? rootNode(this._prevTree) : null; 45 new _LoadSegments(currTree, this._prevTree) 46 .loadSegments(rootNode(currTree), prevRoot, this._routerOutletMap); 47 this._prevTree = currTree; 48 this._changes.emit(null); 49 }); 50 }