Open jaune162 opened 1 month ago
I use the CARD component to display the news to be handled, and different information operations are different. For example, the approval class has "approval" operation and the business class has "processing" operation. ACTION.
But the ACTIONS property provided by Card components receives a TemplateRef array. I can't create this TemplateEF array in a programming way.
I define the template of a single button
`html <ng-template #ACTION Let-name = "name" let-url = "url">> <a [routerlink ]="URL" *ngif="url"> {{name}} </a> <a *ngif=" !url"> {name}} </a> </ng-template>
`
This is my data
`TS actions: [ {name: 'approval', url: '/contract/audit? Serviceid = xxxxxx'}, {name: 'Details', url: '/Contract/Details/xxxxxx'} ]
`
What should I do next?
What problem does this feature solve?
我使用Card组件展示待办消息,不同的待办消息操作也不同,如审批类有“审批”操作,业务类有“去处理”操作,我需要在使用的过程中动态的去创建Card组件的Action。
但是Card组件提供的actions属性接收的是一个TemplateRef数组。我无法通过编程式的方式来创建这个TemplateRef数组。
我定义了单个按钮的模板
这是我的数据
接下来我该怎么做呢?
What does the proposed API look like?