miickel/gulp-angular-templatecache — pull request #21 by bfanger (2014-05-02 13:12:44+00:00)
Title: Dynamically prefix the urls with an angular variable/constant with options.var

We use the php backend to configure the base url:
```php
angular.module('app').constant('WEBROOT', );
```
In development this becomes:
```js
angular.module('app').constant('WEBROOT', 'http://localhost/example-site/public/');
```

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

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

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