Created
January 22, 2013 19:10
-
-
Save ferentchak/4597415 to your computer and use it in GitHub Desktop.
Shows my current idea for dynamically changing the location for my services
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" ng-app="NinjaPantsLazer"> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> | |
<script src="compiled/MadeOnMyServer.js"> | |
//This script file is created dynamicly on your server yourSpecificUrl | |
//can be populated from an enviroment varible on your server | |
angular.module("EnvironmentSpecificModule", []) | |
.value("baseUrl", "http://yourSpecificUrl.com") | |
.factory("BaseURLResolver", ["baseUrl", function(baseUrl) { | |
return function(relativeUrl) { | |
return baseUrl + relativeUrl; | |
}; | |
}]); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment