0

How can I check whether there is a Angular.js script loaded on page?

vinodh
  • 714
  • 1
  • 7
  • 20
  • `if(angular){}`, assuming the variable isn't used by something else. – Cerbrus Aug 21 '15 at 07:31
  • 1
    check this link : http://stackoverflow.com/questions/19742191/how-to-check-if-angular-is-loaded-correctly – bob Aug 21 '15 at 07:33
  • Just i try to check, if the CDN is working properly in my project. I'm using mike and cebrus answer , it is working fine. – vinodh Aug 21 '15 at 07:36

1 Answers1

0

You can check by doing this

if (window['angular']) {
    // Angular is loaded and available to use
}
Mike Vranckx
  • 5,557
  • 3
  • 25
  • 28