是什么区别:data-sly-use,data-sly-resource,data-sly-include,和data-sly-template?我正在阅读文档Sightly AEM,我非常困惑.
据我所知:
data-sly-use用于添加js/java要使用doc呈现的文件data-sly-resource 用于注入组件data-sly-include 用于包含其他html文件(?***?)并且,数据狡猾模板令人困惑,如:
<div data-sly-use.nav="navigation.js">${nav.foo}</div>
<section data-sly-include="path/to/template.html"></section>
<template data-sly-template.one>blah</template>
<div data-sly-call="${one}"></div>
Run Code Online (Sandbox Code Playgroud)
小智 17
正如你已经说过:
请参考官方规格了解更多信息.每个标签有几个例子:
https://github.com/Adobe-Marketing-Cloud/sightly-spec/blob/master/SPECIFICATION.md