天天看點

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

繼續閱讀