How can I loadChildren in my Routes when my module is on some CDN

前端 未结 1 1621
我寻月下人不归
我寻月下人不归 2020-12-21 20:49

Ok, so I want to publish my prebuilt angular module on some cdn, and then let some angular route be able to point to it and have it loaded.

I haven\'t stepped the an

相关标签:
1条回答
  • 2020-12-21 21:51

    Give a link to your module in the SystemJS config file:

    'myModule': 'https://rawgit.com/ghstahl/angular4-goo-module/master/dist/bundles/goo.umd.js'
    

    Then, you can load it like:

    loadChildren: "myModule#GooModule"
    

    See the plunk that illustrates this.

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