10 examples of 'angular get base url' in JavaScript

Every line of 'angular get base url' 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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
1563value: function getUrl(base) {
1564 var root = IS_SAFARI ? base || window.location.href : "";
1565 return "url(" + root + "#" + this.el.id + ")";
1566}
385export function templateJitUrl(ngModuleType, compMeta) {
386 return jitSourceUrl(`${identifierName(ngModuleType)}/${identifierName(compMeta.type)}.ngfactory.js`);
387}
27export function getCGIBase() {
28 let { adminCGIRouteName } = getLocalServerConfig();
29
30 return getSiteRoot() + adminCGIRouteName;
31}
316function getUrl(params) {
317
318 if (!params)
319 params = {};
320
321 if (!params.entity)
322 params.entity = $rootScope.entity;
323
324 var url = $rootScope.buildUrl('/erp/api/task/dt', params); // Build URL with json parameter
325 //console.log(url);
326 return url;
327}
146function getBaseURL(url) {
147 return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
148}
146function getBaseURL(url) {
147 return ('' + url).replace(/^((?:https?|file|ftp):\/\/.+)\/[^/]+$/, '$1') + '/';
148}
106function getScriptUrl(prefix, scriptName) {
107 return prefix + scriptName;
108}
40static getUrl( url ) {
41 url = url.replace( /^https?:\/\//, '' ).replace( /\/wp-admin/, '' );
42 return `https://${ url }/wp-admin`;
43}
49function getBaseURL() {
50 return window.location.href.replace(window.location.hash, '');
51}
141getRestCallUrl(moduleUrlKey: string) {
142 if (!this.urlMapping[moduleUrlKey]) {
143 throw new Error("Url Mapping doesnt exist");
144 }
145 return this.restEndpointService.getServiceHost() + this.urlMapping[moduleUrlKey];
146}

Related snippets