dagger.js
dagger.js copied to clipboard
Is there anything about slot
Is there anything about the use of slots and the scope of slots
Is there anything about the use of slots and the scope of slots
No. "slot" is used to insert custom content in some frameworks such as Vue/Svelte. In dagger.js, you need to put the dynamic content insides the fields of $scope, and render it with "$html" or "$text" directive of the child module. It should be a more general solution than slots.
The slot feature is supported for now, please refer to https://codepen.io/dagger8224/pen/bGKPNwN for the usage of it. Thanks.
Is there anything about the use of slots and the scope of slots
No. "slot" is used to insert custom content in some frameworks such as Vue/Svelte. In dagger.js, you need to put the dynamic content insides the fields of $scope, and render it with "$html" or "$text" directive of the child module. It should be a more general solution than slots.
Encourage component encapsulation?
If the component is encapsulated and for is encapsulated in the sub component, how can the display of a field in the sub component be modified in the parent component
Is there anything about the use of slots and the scope of slots
No. "slot" is used to insert custom content in some frameworks such as Vue/Svelte. In dagger.js, you need to put the dynamic content insides the fields of $scope, and render it with "$html" or "$text" directive of the child module. It should be a more general solution than slots.
Encourage component encapsulation?
If the component is encapsulated and for is encapsulated in the sub component, how can the display of a field in the sub component be modified in the parent component
Please refer to this demo https://codepen.io/dagger8224/pen/vYdZKgx?editors=1100 to check out what happens if you modified the "message" field in the parent scope.
@wssnail Since the version 0.9.17 dagger.js supports slot feature already. You may reference to https://codepen.io/dagger8224/pen/bGKPNwN for the usage of slot, thanks for your suggestion.