8

I used adal-angular js to protect my routes.

  $routeProvider.
        when("/dashboard", { templateUrl: "Views/Dashboard.html", controller: "DashboardController", requireADLogin: true })

But when Adal getting token, I have an error in console:

Error: [$compile:tpload] Failed to load template: Views/Dashboard.html (HTTP status: undefined undefined)

Could someone know why it happens?

Oleg
  • 1,467
  • 4
  • 26
  • 39
  • Make sure the path specified for Dashboard.html file is correct?. Maybe Views folder is not at the root level, where you have your web.config. – ezile Mar 27 '16 at 06:27
  • See https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/261 - this looks similar. – Jahfet Apr 06 '16 at 18:16
  • Did you ever find a solution to this? I'm having the same issue and I'm just coming upon dead ends. – Ranger Jun 20 '16 at 15:55
  • 2
    @Nex Terren unfortunately no(. I investigated src adal angular and it is library issue. – Oleg Jun 24 '16 at 08:01

2 Answers2

5

First, forgive my english.

For me only have worked when I specified "/myUrl" in anonymousEndpoints. That skip the interceptor for this backend url.

  • 4
    This was actually helpful. I had this error `Error: [$compile:tpload] Failed to load template: ngToast/toast.html` and I added `anonymousEndpoints : ['ngToast/toast.html']` to adal init and the error dissapeared – Mariusz Pawelski Nov 09 '16 at 10:31
  • but now it doesn't authenticate the view – Chris Hayes Jun 19 '19 at 18:24
0

I had an issue with this for angular ui bootstrap templates. Adding the path "uib/" to the anonymous endpoints array fixed my problem.

superdave
  • 1,928
  • 1
  • 17
  • 35