这个设置的说明怎么理解?求高手
发布于 9 年前 作者 xiaoyang2022 3387 次浏览 最后一次编辑是 8 年前 来自 问答

MyPackage.aggregateAsset(‘js’,‘first.js’,{global:true, weight: -4, group: ‘header’});

The line that gets loaded in your head.html calls the header group and injects the js you want to include first- in packages/system/server/views/includes/head.html <script type=“text/javascript” src="/modules/aggregated.js?group=header"></script>

这个设置的说明怎么理解?求高手

3 回复

没有上下文,看不懂

第一行是设置 header 这个 group 包含哪些文件, 第二告诉你把下面这段代码放到 head.html 里面,当代码执行到这段代码时,就会把第一行设定好的js文件插入到这个html页。 第三行。。。 貌似就是个动态加载某组js的货。

@klesh 基本是这个意思,一时没有看懂,谢谢 自豪地采用 CNodeJS ionic

回到顶部