Giter Site home page Giter Site logo

Comments (8)

Harpush avatar Harpush commented on April 28, 2024 1

@Harpush is the setInput available automatically when using @ContentChildren? I've only used it with dynamic components and still am not clear if it's currently available?

No it isn't. The issue I linked suggest adding it to injection of host component from directive. This issue seems half way similar as it can be solved if content child could get not the component instance but the component ref instead.

from angular.

alxhub avatar alxhub commented on April 28, 2024 1

@RobbyRabbitman just note that SIGNAL isn't public API.

from angular.

Harpush avatar Harpush commented on April 28, 2024

One can say it is half way related to #47398
As injecting the component ref of the projected component (in this case with content child) would allow setInput usage

from angular.

Fernker avatar Fernker commented on April 28, 2024

@Harpush is the setInput available automatically when using @ContentChildren? I've only used it with dynamic components and still am not clear if it's currently available?

from angular.

Fernker avatar Fernker commented on April 28, 2024

Although setInput seems pretty broadly typed, which might make sense with a ComponentRef but it would need to be narrower to be most useful.

from angular.

Harpush avatar Harpush commented on April 28, 2024

Although setInput seems pretty broadly typed, which might make sense with a ComponentRef but it would need to be narrower to be most useful.

There is an open issue for better setInput types too

from angular.

Fernker avatar Fernker commented on April 28, 2024

Would the componentRef still include a reference to the component class to be able to access other methods on the class that aren't inputs?

from angular.

RobbyRabbitman avatar RobbyRabbitman commented on April 28, 2024

I had a similar situation, which was solved by unwrapping the Signal Input with the SIGNAL symbol and use setSignalValueFn (or something like that... typing this comment from mobile). I don't know if that's intended, but it worked :D

from angular.

Related Issues (20)

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.