PeopleVine

Loading Templates with Angular

By default Angular is looking for local files when loading templates, so in order to allow Angular to load html templates loaded within the PeopleVine CDN, you need to add the following code to your Angular app:

angular.module(‘YOURAPP’,[]).config(function($sceDelegateProvider) {
  $sceDelegateProvider.resourceUrlWhitelist([
    // Allow same origin resource loads.
    'self',
    // Allow loading from our assets domain.  Notice the difference between * and **.
    'http://cdn.peoplevine.com/**'
  ]);
});
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.