【问题标题】:How to include/refer existing angularjs project into another project?如何将现有的 angularjs 项目包含/引用到另一个项目中?
【发布时间】:2018-01-02 12:04:56
【问题描述】:

如图所示,Angular app1 是 app2 和 app3 的通用模块。是否可以在公共模块中注入 app2 和 app3 ?

如果不可能,谁能告诉我们如何实现它?

注意:目前我正在尝试使用 bower install 注入 app2 和 app3。这是正确的吗?

【问题讨论】:

  • 所以 app2 和 app3 都将使用 app1?
  • @Omar Einea 是的。根据用户选择将显示 app2 & app3

标签: angularjs angular angularjs-directive bower angularjs-controller


【解决方案1】:

最后我们使用 AngularJS 模块化实现了这个功能。

Webpack 是一个模块打包器,这是什么意思?好吧,它基本上采用具有依赖关系的模块并生成静态资产来表示这些模块。

更多信息: http://angular-tips.com/blog/2015/06/using-angular-1-dot-x-with-es6-and-webpack/

【讨论】:

    猜你喜欢
    • 2012-03-11
    • 2014-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多