Comments (4)
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.
from dagger.js.
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
from dagger.js.
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.
from dagger.js.
@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.
from dagger.js.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagger.js.