GithubHelp home page GithubHelp logo

Is there anything about slot about dagger.js HOT 4 OPEN

wssnail avatar wssnail commented on June 25, 2024
Is there anything about slot

from dagger.js.

Comments (4)

dagger8224 avatar dagger8224 commented on June 25, 2024

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.

wssnail avatar wssnail commented on June 25, 2024

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.

dagger8224 avatar dagger8224 commented on June 25, 2024

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.

dagger8224 avatar dagger8224 commented on June 25, 2024

@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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.