Loading Templates with Angular
Jordan Gilman avatar
Written by Jordan Gilman
Updated over a week ago

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/**'
  ]);
});
Did this answer your question?