How can I get around "Blocked loading resource from url not allowed by $sceDelegate policy. URL: login.html"

1.8k views Asked by At

I amusing Nodejs and creating a single page app. Locally everything is working fine. When I deploy to my AWS server, I get the follow error (Blocked loading resource from url not allowed by $sceDelegate policy. URL: login.html). I am using angularjs and putting my templates on my master SPA page like so.

doctype html
html(lang='en',ng-app='ChangeApp',md-theme='green')
  include ./includes/head
  body
    div.containerMain
      div.main-content
        div(ng-view,autoscroll="true")
        noscript This site requires javascript!
  script(type="text/ng-template", id="login.html")
    include top/login
  script(type="text/ng-template", id="jobseeker.html")
    include jobSeekers/jobSeeker

My angular controller looks like

angular.module('ChangeApp',
  ['ChangeApp.services',
    'ChangeApp.directives',
    'ChangeApp.controllers',
    'ngRoute',
    'ngMaterial']);

angular.module('ChangeApp')
  .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
console.log('Loaded: app.js');
    $routeProvider
      .when('/login', {
        templateUrl: 'login.html',
        controller: 'LoginCtrl'
      })
      .when('/jobseeker', {
        templateUrl: 'jobseeker.html',
        controller: 'JobseekerCtrl'
      })
      .otherwise({
        redirectTo: '/login'
      });
    $locationProvider.html5Mode(true).hashPrefix('!');
  }]);

Any thoughts or insights would be greatly appreciated.

0

There are 0 answers