Dynamically prefix the urls with an angular variable/constant with options.var

We use the php backend to configure the base url:
angular.module('app').constant('WEBROOT', <?php json_encode($webroot); ?>);

In development this becomes:
`angular.module('app').constant('WEBROOT', 'http://localhost/example-site/public/');`

And in production this becomes:
`angular.module('app').constant('WEBROOT', 'http://example.com/');`

Which is used to build the template and api urls: `templateUrl: WEBROOT + 'views/template.html`

Without the options.var the $templateCache.put operation would only work in either production or development but not both.