Skip to content

Property binding[] is not working when we call angular element from parent project  #50

Closed

Description

@subham-subhasis
  1. I have an element named element-setpassword
  2. i have place it in the assests of route application after build
  3. when i try to send data from parent to element it is failing if i am using property binding. example below
    <element-setPassword id="element-set-password" *axLazyElement="elementUrl" [usernamevalue]="name"> --> failing

<element-setPassword id="element-set-password" *axLazyElement="elementUrl" usernamevalue="subham"> --> working

Activity

  1. tomastrajan commented on May 14, 2020

    @tomastrajan
    Member

    @subham-subhasis hard to say what is wrong, such use case is up and running in showcase and also in many projects I was working on professionaly.

    My best guess is that it is a problem with how the element was implemented.

    Wish you good luck!

  2. gshokanov commented on May 18, 2020

    @gshokanov
    Contributor

    Hi @subham-subhasis @tomastrajan
    I can confirm I have encountered this issue as well. I previously had some issues with property binding and custom elements but always managed to find workarounds.
    I think I may have found a one-line fix for this, will try to submit a PR today.

  3. tomastrajan commented on May 19, 2020

    @tomastrajan
    Member

    @MagicCurlyHair thx for the PR, @subham-subhasis please, see the PR for details.

  4. subham-subhasis commented on May 19, 2020

    @subham-subhasis
    Author

    I have used attr. attribute what I want to send , it worked. _ know its a silly thing & tried all the things to fix that.

    Thanks everyone for sharing your time to fix this.

  5. FinalVersion commented on Jun 15, 2020

    @FinalVersion

    @MagicCurlyHair I believe I encountered the same issue. When passing as static attribute, the custom element (created by angular elements) can receive it as input, when passing as property binding, the custom element get undefined input value. Can I use your patch without having to upgrade to Angular 10?

  6. gshokanov commented on Jun 15, 2020

    @gshokanov
    Contributor

    @FinalVersion sure, it's actually build with Angular 9. The only reason for major version bump is that the change is potentially breaking but that shouldn't be the problem for the intended use case. Please leave a comment in the PR whether it fixes your issue.

  7. tomastrajan commented on Jun 28, 2020

    @tomastrajan
    Member

    @FinalVersion the version 10.0.0 for Angular 10 was released just now, please feel free to try it in your project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions