AngularNYC - Angular CDK portals - Nir Kaufman (@nirkaufman)

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 25

  • @deepesttrouble1
    @deepesttrouble1 2 года назад

    Oh man... I am crying with happiness. Such concious lecture on the CDK portal.

    • @sachinvarghese2223
      @sachinvarghese2223 2 года назад

      can you do it in the latest version. cause i am getting deprecated message. 🙃

  • @lukasseifert2228
    @lukasseifert2228 4 года назад +3

    Thanks Nir, well explained and sprinkeld with great humor :-)

  • @sebuzz17
    @sebuzz17 2 года назад

    Great stuff, thank you so much, that changes from the basic todo list tutorials 😅

  • @yboris
    @yboris 6 лет назад +1

    Amazing talk! Thank you Nir!

  • @jorgeromero4680
    @jorgeromero4680 2 года назад

    amazing

  • @ahmedarigui2828
    @ahmedarigui2828 6 лет назад +2

    Great talk !!!! where could we find the code attached for this? Thx !!!

  • @miguelangeldelfresnorodrig2199
    @miguelangeldelfresnorodrig2199 5 лет назад +1

    Great talk! thx!!

  • @GabrielRivera-wx9sk
    @GabrielRivera-wx9sk 5 лет назад

    In the first approach you say that there is unwanted coupling due to the component needing to know about the component being injected inside. I have been able to add an Input that accepts a component class, and then I pass that input to the ComponentFactoryResolver and it all works fine. Any issues w/ this approach?

  • @LongTran-nm3ne
    @LongTran-nm3ne 7 месяцев назад

    Thanks Nir for your excellent tutorial.
    I'm using Angular 17 and meet some problems:
    1/ document.querySelector('#action') throw an error as this function may return a null
    2/ @ViewChild(CdkPortal) portal!: CdkPortal; return undefined and the host cannot attach portal
    Here is my solution:
    import PortalModule (solve the undefined portal)
    ngAfterViewInit(): void {
    const el = document.querySelector('#action')
    this.host = new DomPortalHost(
    el || new HTMLElement,
    this.componentFactoryResolver,
    this.applicationRef,
    this.injector
    );
    this.host.attach(this.portal)
    }
    ngOnDestroy(): void {
    if (this.host){this.host.detach() }
    }

  • @c0mpuipf
    @c0mpuipf 5 лет назад +1

    תותח

  • @AdrianClaudiuDima
    @AdrianClaudiuDima 5 лет назад

    Great talk and nice job. The only thing I don't like is the use of document.querySelector, but since you are in a child, you cannot access it as it is at an upper level.

  • @UlisesLegarreta
    @UlisesLegarreta 5 лет назад +5

    21:57 You're Welcome

  • @yanaiedri
    @yanaiedri 6 лет назад +1

    אחלה הרצאה :)

  • @masterlup
    @masterlup 5 лет назад +3

    05:15 I would say the talk starts here!

    • @jamalsalman7188
      @jamalsalman7188 5 лет назад +1

      I mean yes, but you don't really want to skip the first couple of minutes... it's gold

  • @rehanahmed6210
    @rehanahmed6210 5 лет назад +1

    👍👍👍

  • @masterlup
    @masterlup 5 лет назад +1

    its strange, they (angular) do everything to encapsulate everything, only so you can boilerplate stuff from component-a into component-b. :D

  • @dilshanliyanage
    @dilshanliyanage 6 лет назад +2

    ComponentFucktoryResolver

  • @D9ID9I
    @D9ID9I 3 года назад

    Overcomplicated as usually. Someone has to fire these guys from google.