Same problem. Want to load templates from CDN.

Any ideas?

среда, 21 ноября 2012 г., 22:55:54 UTC+6 пользователь Julien Ricard написал:
>
> Hi,
>
> I would like to use templates that are not located in the root directory. 
> I don't want to use a global variable or "base href" (which is really ugly) 
> and may conflict with other parts of my application.
>
> I thought I could at least use a provider, but I cannot find how to use 
> one of my services in the .config call. I highlighted in blue the thing I 
> was thinking of but I didn't succeed in making it work.
>
> Of course I don't want to hardcode the base path for my templates in every 
> line of my routing config.
>
> myAppModule=angular.module('myApp', ['myApp.services'])
> .config(['$routeProvider', '$locationProvider', 'app*Params*' 
> function($routeProvider, $locationProvider) {
> $locationProvider.html5Mode(false);
>  $routeProvider.
>         when('/things', {templateUrl: appParams.basePath() + 
> 'partials/things.html',   controller: 'CampaignListCtrl'}).
>         otherwise({redirectTo: '/campaigns'})
> }
> ]);
>
> Any idea ?
> Thank you
> Julien
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to