sqlcte sqlcte - 5 months ago 99x
Javascript Question

Angular busy error Template specified could not be loaded

I'm trying to use Angular busy in my application.My code is very simple which I have taken from the github Angular busy sample

<div cg-busy="promise"></div>
$scope.promise = $http.get('http://httpbin.org/delay/3');

But I'm getting the error

"Template specified for cgBusy (angular-busy.html) could not be loaded."


Looks like it is trying to use the default templateUrl that is shipped with cgBusy. Did you try overriding the templateUrl per the documentation on the github page?

  message:'Loading Stuff',
  backdrop: false,
  templateUrl: 'my_custom_template.html',
  delay: 300,
  minDuration: 700,
  wrapperClass: 'my-class my-class2'

Edit: As far as the location of the template... I looked at the source of the plugin and it using the $templateCache. See that documentation for how to add a template to it.