Every line of 'get current url in angular' 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.
302 function getCurrentPath($scope,$http,path){ 303 if(path){ 304 var cutLength = ($scope.rootPath).length; 305 var currentPath = path.substring(cutLength,path.length); 306 return currentPath; 307 }else{ 308 return ""; 309 } 310 }
19 function read_current_url() 20 { 21 mainwp_current_url = document.location.href.replace( /^.*?\/([^/]*?)\/?$/i, '$1' ); 22 return mainwp_current_url; 23 }
20 get currentUrl () { 21 return this.location.url(); 22 }
380 function getCurrentPath() { 381 return this.selectedSidebarItem ? this.selectedSidebarItem.path : ''; 382 }
313 function goToAngularDetails(params) { 314 return detailRoute + 'OS::Glance::Image/' + params.id; 315 }
26 function getURL() 27 { 28 var url = document.documentURI; 29 var match = url.match(/&u=([^&]+)&/); 30 31 // match == null if not found; if so, return an empty string 32 // instead of what would turn out to be portions of the URI 33 if (!match) 34 return ""; 35 36 url = decodeURIComponent(match[1]); 37 38 // If this is a view-source page, then get then real URI of the page 39 if (url.startsWith("view-source:")) 40 url = url.slice(12); 41 return url; 42 }
194 get currentURL() { 195 return this._dataSource.url; 196 }
41 public static getPage(url: string): string { 42 let urlParts = url.split('/'); 43 return urlParts[(urlParts.length - 1)]; 44 }
203 getPath () { 204 return this.addressbar.value.replace(this.addressbar.origin + this.options.baseUrl, '').split('?')[0] 205 }
83 function viewUrl (url) { 84 return 'beaker://editor/' + url.slice('dat://'.length) 85 }