Last active
December 21, 2016 10:10
-
-
Save overbyte/e045773f68408e09bb80402389fbf722 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
** To Allow relative template paths, we wrap the component in a function that receives the path to the | |
** currently executing script (minus the actual filename) | |
**/ | |
(function (currentScriptPath) { | |
'use strict'; | |
angular | |
.module('module.name') | |
.component('startupView', { | |
templateUrl: currentScriptPath + '/startup.view.html', | |
bindings: {}, | |
controller: function StartupCtrl() { | |
var ctrl = this; | |
ctrl.$onInit = function () { | |
}; | |
ctrl.$onDestroy = function () { | |
}; | |
} | |
}); | |
})( | |
(function () { | |
var scripts = document.getElementsByTagName( 'script' ); | |
var currentScriptPath = scripts[scripts.length - 1].src; | |
return currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/')); | |
})() | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment