有一个symfony 2项目使用了extjs4前端。我从一个extjs包开始,它现在包含了整个extjs应用程序。问题是,随着项目的发展,它将很难管理。
我认为,最好的解决方案是将所有extjs文件重新定位到相关的包中
(例如:发送到UserBundle所有窗体、面板、网格等)并使用中央Extjs包来加载它们。
以这种方式组织项目的最佳实践是什么?
And how to include the js files from another bundle?
Or should I create extjs app to every bundle (I'm not sure it w
我有一些常见的函数,需要在ExtJS4应用程序中的几个文件中重用它们。下面是几个例子:
或者,如果您不想转到该链接:
/* This adds a method to String objects that allows you to test
* whether or not a certain character or string exists in a target
* string. In raw JS you need to check for .indexOf("test") !== -1
*/
String.prototype.contains = fun
我能找到的大多数动态模块都不是真正的动态模块,实际上是惰性加载程序,因为它们大多需要您在配置文件和寄存器中注册您想要加载的内容。
我正在寻找一个加载器js的方式使用约定,只是自动加载文件夹下的任何东西为我的一页应用程序。
类似于:
app
public
loader.js <-- no need to register anything manually
modules
module1
controllers
controller1.js