How to check for the existence of a module without an error being raised?

前端 未结 7 763
小蘑菇
小蘑菇 2020-12-24 01:04

In Angular 1.2, ngRoute is a separate module so you can use other community routers like ui.router instead.

I\'m writing an open-source mod

相关标签:
7条回答
  • 2020-12-24 02:02

    AngularJS 1.6.3 and up has a way to check if a module is loaded via the $injector service.

    Also added in 1.6.7 was the ability to load new modules which may be of interest to some.

    0 讨论(0)
提交回复
热议问题