Last active
March 28, 2018 14:29
-
-
Save t-palmer/14c05c8b6e3dde76299e9881a3f14d76 to your computer and use it in GitHub Desktop.
Tour of Heroes index.html updated to support deployment anywhere.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Tour of Heroes</title> | |
<base href="/" id="baseHref"> | |
<script> | |
(function() { | |
var mypath = window.location.pathname; | |
mypath = mypath.endsWith('/') ? mypath : mypath+'/'; | |
var hispath = '/' + window.location.pathname.split('/')[1] + '/'; | |
console.log('mypath',mypath); | |
console.log('hispath',hispath); | |
console.log('window.location.pathname',window.location.pathname); | |
document.getElementById('baseHref').href = mypath; | |
})(); | |
</script> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
</head> | |
<body> | |
<app-root></app-root> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment