天天看点

SAP Spartacus directive学习笔记

directive: 目的是给DOM元素添加自定义行为,可以和Component class一样,实现life cycle hooks:

SAP Spartacus directive学习笔记
SAP Spartacus directive学习笔记

Can’t bind to ‘cxFocusConfig’ since it isn’t a known property of ‘div’. ("

答案:

you cant use input/output outside component / directive tag

正确做法?

Hello

SAP Spartacus directive学习笔记

so it seems the name of selector and input are kept the same ON PURPOSE?

I think for small directives (single responsibility and single input) its simplified usage

继续阅读