SAP Spartacus 里 ng-template和ng-container的嵌套使用
源代码:
<h4>Jerry: {{position}}</h4>
<div *ngIf="components[0]">
<h5>Component uid: {{ components[0].uid }}</h5>
<h6>Type code: {{ components[0].typeCode }}</h6>
</div>
<h4>end</h4>
<ng-template[cxOutlet]="position"[cxOutletContext]="{ components$: components$ }"
>
<div>before ng-template</div><ng-template*ngFor="let component of components"[cxOutlet]="component.flexType"[cxOutletContext]="{ component: component }"[cxOutletDefer]="getComponentDeferOptions(component.flexType)"(loaded)="isLoaded($event)"><div>before ng-container,type: {{ component.flexType}}</div><ng-container [cxComponentWrapper]="component"></ng-container><div>after ng-container</div></ng-template>
<div>after ng-template</div>
</ng-template>
SAP Spartacus 里 ng-template和ng-container的嵌套使用相关推荐
- SAP Spartacus 里的 icon 设计
同 SAP Fiori 一样,SAP Spartacus 里也有大量的自定义 icon 设计,比如下图的 iconTypes.RESET: 需要调用 iconLoader 获取 RESET icon ...
- Media Query在SAP Spartacus里的用途
Media queries are useful when you want to modify your site or app depending on a device's general ty ...
- SAP Spartacus里的feature module
SAP Spartacus里Component的使用受featureModule控制:
- SAP Spartacus 里的 .release-it.json 文件
在 SAP Spartacus package.json 里有一个依赖叫做 release-it: 这个工具的链接:https://github.com/release-it/release-it 这 ...
- SAP Spartacus 里的 cxOutletRef 指令执行过程分析
先看 cxOutletRef 指令的效果:ng-template 里定义了如下图标 1 区域所示的自定义 UI,通过 cxOutletRef, 将其插入到图标 2 所示的 ProductDetails ...
- 如何找到 SAP Spartacus 里某个 Component TypeScript 编译后生成的 JavaScript 位置
需求 如何找到触发该网络请求的准确代码位置? 从 initiator 里查看调用栈上下文,一点头绪也没有. 找到触发该网络请求的控件的 selector:cx-register 在 Storefron ...
- SAP Spartacus里的localStorage用法
window-ref.ts: get nativeWindow(): Window {return typeof window !== 'undefined' ? window : undefined ...
- SAP Spartacus里product数据请求的HTTP url是在哪里维护的
我们打开SAP Spartacus home页面时,能观察到product carousel里待显示的product数据从后台被请求: 随便点开一个url,格式如下: https://jerry.ea ...
- SAP Spartacus里modifiedtime的大小写问题
从cms返回的Component数据,modifiedtime全部小写: https://github.com/SAP/spartacus/issues/2521 这个issue里,把所有modifi ...
- 使用ng-container标签在SAP Spartacus里插入UI
<p>before</p> <ng-container [cxComponentWrapper]="componentMeta"></ng ...
最新文章
- 下列哪个不是目前python里的内置模块-python的内置模块math在哪个文件里
- CG-CTF-Web-文件包含
- Java面试题及答案,mysql可视化工具
- GCC 命令选项使用详解
- js 正则 长度不超过50_如何花不超过50元人民币,拍抖音网红海马体照片?
- 数据库设计14个技巧
- java猜拳论文_Java人机猜拳实现的思路及方法实例
- sql删除快还是update快_下班回家,是骑自行车减肥快还是走路减肥快?
- docker之快速部署gogs git
- Fedora下SAMBA的相关配置
- android camera 拍照流程图
- 动态规划实战篇--斐波那契数列
- 键盘移动小div(js原生)
- im即时通讯消息id的设计
- linux ps2键盘不能用,解决usb鼠标与ps2键盘合用时开机键盘失效
- 5059页,Python3.x最新版「官方中文教程」已经发布,内含教程、标准库、语言参考,及新版本特性!...
- matlab基础及应用 李国朝,Matlab基础与应用(李晓鹏)
- 华为云,如何带领企业成功上云?
- OMNI USDT 0.12.0 环境部署
- Dockerfile 构建镜像以及镜像优化的方法