Angular CTRL
Split a url and join it
JavaScript
const url = 'http://staging.forsomeurl/for/a/thing';
const split = url.split('//');
split[0] = 'https://';
const newUrl = split.join('');
console.log(split, newUrl);
const url = 'http://staging.forsomeurl/for/a/thing';
const split = url.split('//');
split[0] = 'https://';
const newUrl = split.join('');
console.log(split, newUrl);