Angular Tutorial - 15 - Component Interaction

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 218

  • @thehoangnguyen9985
    @thehoangnguyen9985 6 ปีที่แล้ว +52

    On the latest Angular 6 version, in order to work, you will have to comment out the default
    import { EventEmitter } from 'events'
    and include EventEmitter from '@angular/core'
    I don't really know what is the EventEmitter from events is, they have the same name but different purpose it seems.
    Can anyone explain this?

    • @Codevolution
      @Codevolution  6 ปีที่แล้ว +29

      The video is reflects Angular 5 but it has changed in Angular 6 as you point out. I will pin this comment so that it will be helpful for others with the same problem. Thanks

    • @idlevandal69
      @idlevandal69 6 ปีที่แล้ว +4

      Has the video been updated? He is importing EventEmitter from @angular/core at 5:50

    • @johan_maximus
      @johan_maximus 6 ปีที่แล้ว +2

      You saved my life (Y)

    • @vatsalshah6505
      @vatsalshah6505 5 ปีที่แล้ว +4

      should have show multiple value passing. just a suggestion.

    • @endrefidje5698
      @endrefidje5698 5 ปีที่แล้ว +6

      Will there be an updated version of these Angular tutorials based on Angular 7? Seems to be a few things "broken" now.

  • @Skaxarrat
    @Skaxarrat 6 ปีที่แล้ว +85

    I just found your tutorials and I'm enjoying them. This is my 15th video in a row :) Can you do sometimes videos doing small projects (20-60 min vídeos) where you create a small SPA? This way we could learn how to put every thing we learnt together.

  • @SoumilShah
    @SoumilShah 4 ปีที่แล้ว +31

    I have learned more from your videos than Udemy course Good luck Great Job !!!

    • @nellyville8657
      @nellyville8657 4 ปีที่แล้ว +1

      Plz did you succed with the Output Event. It does'nt work with me

  • @fuzailraashid3041
    @fuzailraashid3041 4 ปีที่แล้ว +3

    Very tricky topic...yet explained in a way as a child's play..hats off to you.

  • @subramanyamchapala7362
    @subramanyamchapala7362 5 ปีที่แล้ว +2

    sir your teaching skills are legendary. Very understandable lecture. thank u .

  • @shreeameybro2714
    @shreeameybro2714 ปีที่แล้ว +1

    Learnt the basics within roughly in 3 days thank you sir !!

  • @피누-s6k
    @피누-s6k 3 ปีที่แล้ว +16

    If any one getting this error in Angular 12
    error TS7008: Member 'parentData' implicitly has an 'any' type.
    @Input () public parentData;
    use
    @Input () public parentData: any;

  • @devinosborne3396
    @devinosborne3396 3 ปีที่แล้ว

    It's Unfair how good these explanations are of Angular.

  • @eriksenp
    @eriksenp 6 ปีที่แล้ว +7

    Great Job bro! What if I have an app-menu and a router-outlet in my app-root, how can I pass data from parent to components?

  • @Gyanitheking
    @Gyanitheking 4 ปีที่แล้ว +3

    Sir, You simplify even the hardest of things.
    Thanks for putting up these videos

  • @IAmNumber49
    @IAmNumber49 ปีที่แล้ว

    Thank you very much... I feel like a loser while programming in angular, but now I've watched this, it helped me a lot to understand how that works.

  • @lifeislove9750
    @lifeislove9750 6 ปีที่แล้ว +1

    Your way for teaching is really really awesome. 👌👌👌

  • @kaushikpower
    @kaushikpower 3 ปีที่แล้ว

    Your explanation is so simple yet powerful.❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @bholarai6348
    @bholarai6348 5 ปีที่แล้ว +2

    Wonderfully explained, with simplest possible example, thanks

  • @VolodymyrM_UA
    @VolodymyrM_UA 2 ปีที่แล้ว +1

    If you get "Can't bind to 'parentData' since it isn't a known property of 'app-test'" error message,
    check if your test component's selector is defined as Tag: 'app-test'
    (and used as custom HTML tag: in the app component).
    Because Class selector: '.app-test' ()
    and Attribute selector: '[app-test]' ( )
    will not work, with the above error.

  • @chagantisubhash
    @chagantisubhash 6 ปีที่แล้ว +4

    Awesome, considering donating to encourage your work!! Thanks alot.

  • @gwynethpena5305
    @gwynethpena5305 3 ปีที่แล้ว

    your teaching skills is superb!

  • @AbhishekKumar-sf6no
    @AbhishekKumar-sf6no 5 ปีที่แล้ว +1

    woah bro! keep it up.......
    no ads and best content!
    such passion and hard work i salute you bro.
    and may god bless u....

  • @gtrj55tgjr
    @gtrj55tgjr 5 ปีที่แล้ว +2

    Hello sir.
    Thnks for the great tutorial but i have a question, you have send data from child to parent by clicking a button(or by event) , but i dont want to click a button, i want to send while loading and without clicking any button then what should i do for tht

  • @shilpasoni4609
    @shilpasoni4609 4 ปีที่แล้ว +1

    Thank you! this series is really helpful and easy to understand for beginners.

  • @vzsshadow3141
    @vzsshadow3141 6 ปีที่แล้ว +3

    Thank you very much this video, i am very noob in angular but this was perfectly clear explanation

  • @shadow_3213
    @shadow_3213 5 ปีที่แล้ว +3

    Thank you from my heart for your helpfull videos Vishwas !!!

  • @abhishekmungekar8899
    @abhishekmungekar8899 5 ปีที่แล้ว +4

    I am facing an error @Output childData not initialized in 'TestComponent'. using angular 7

  • @HIghtowerSever
    @HIghtowerSever 4 ปีที่แล้ว +1

    Extremely understandable explanation! Thanks a lot.

  • @ABsazerNer
    @ABsazerNer 4 ปีที่แล้ว

    You tutorials are always the best, cause you always teach with examples, keep up 👍

  • @Praneethyerireddi1234
    @Praneethyerireddi1234 3 ปีที่แล้ว

    Very simple upto the point video brother. Great ...

  • @hariharannagarajan6739
    @hariharannagarajan6739 4 ปีที่แล้ว +1

    I intialized the variable name as vishwas, i used the variable in app.component.html, as
    But it threw an error as "parentData is not a known property of app-test".
    Kindly advice how to fix this error.

    • @archanakurup6158
      @archanakurup6158 4 ปีที่แล้ว

      @Input() parentData; in App test.Import @Input from Angular/core

  • @sagar8964
    @sagar8964 5 ปีที่แล้ว +1

    you are an amazing teacher...!

  • @manwinsingh7381
    @manwinsingh7381 2 ปีที่แล้ว

    so far soooo good. Really a great course on angular

  • @Hasansaid51
    @Hasansaid51 4 ปีที่แล้ว +1

    what if my parent component has
    How would i lift up an event from child to parent?

  • @ankitagupta6232
    @ankitagupta6232 3 ปีที่แล้ว

    can we send multiple data from child to app component or vice-versa?

  • @mdfarooq97
    @mdfarooq97 5 ปีที่แล้ว +1

    One of the best, to-the-point Angular tutorials. Great Job! Keep it up!
    I would like to know something more about the component interaction, I have a case where components are not in parent-child relationship and I would like to communicate between them using events, is this possible? For example, There is AppComponent which holds two other components inside it, ComponentA and ComponentB, will it be possible for ComponentA to send events to ComponentB?

    • @naveenm283
      @naveenm283 5 ปีที่แล้ว

      yup I am stuck in the same situation

    • @kishanlal676
      @kishanlal676 4 ปีที่แล้ว

      Why don't you pass the data from ComponentA to Parent and Parent to ComponentB? I don't know whether there is any straightforward solution for this.

  • @manosubburaj2901
    @manosubburaj2901 5 ปีที่แล้ว

    Great channel to learn new technologies. Your way of telling is superb. Cngrtz

  • @kp00002
    @kp00002 6 ปีที่แล้ว +1

    Great Angular Video collections ! Keep it up.

  • @rexsam3134
    @rexsam3134 3 ปีที่แล้ว

    Do you have any videos on communication between 2 child components?

  • @princeprabhu44
    @princeprabhu44 ปีที่แล้ว

    Very good explanation

  • @zaldi19
    @zaldi19 6 ปีที่แล้ว +1

    Can we do the same using service?

  • @Thanveershah
    @Thanveershah 6 ปีที่แล้ว +11

    Open a Patreon or something , So we can actually donate money for your Amazing work

  • @syawalnazir4676
    @syawalnazir4676 6 ปีที่แล้ว +1

    great job Vishwas. I enjoyed learning the basics from your videos. I have a question regards to this child and parent. Can the data using @output from test.component.ts sends to app.components.ts or app.components.html and that being called in instead of

    • @amirdar116
      @amirdar116 ปีที่แล้ว

      .ts file because we are sending value to properly declared in component class of parent

  • @arnabmondal5596
    @arnabmondal5596 6 ปีที่แล้ว +1

    Can we pass an object to the parent thru event and assign it to a property in parent component?

  • @8Kexperience
    @8Kexperience 5 ปีที่แล้ว +1

    awesome work, thank you!

  • @zakkanderson817
    @zakkanderson817 6 ปีที่แล้ว +6

    donation done! amazing work! keep going

  • @nr7343
    @nr7343 4 ปีที่แล้ว

    your explanetoins is very clear!!! good

  • @ahmedabdelaziz4425
    @ahmedabdelaziz4425 5 ปีที่แล้ว

    I like you angular tutorials, its very easy to understand and apply

  • @Johny-y7w
    @Johny-y7w 2 หลายเดือนก่อน

    Thanks you sir! Great explanation

  • @tom17936548
    @tom17936548 4 ปีที่แล้ว

    Very clear explanation👍

  • @SSR2902
    @SSR2902 4 ปีที่แล้ว

    Do we only have 1 parent and 1 child, What we have multiple parents with the properties of the same name? How does he know what property I am referring to?

  • @barezazad2830
    @barezazad2830 5 ปีที่แล้ว

    thank u mr vishvas , you very help me ..................

  • @imhappynow8471
    @imhappynow8471 5 ปีที่แล้ว +1

    finally someone explains it well

  • @kidoo1567
    @kidoo1567 4 หลายเดือนก่อน

    Data transfer between parents and child components are using @input and @output decorator

  • @satepestage3599
    @satepestage3599 2 ปีที่แล้ว

    Thanks bro. You explain things very well

  • @kleelof
    @kleelof 4 ปีที่แล้ว

    Good videos. One note. The proper name for '$' is 'string', not 'dollar'.

  • @vijaykarumuri7617
    @vijaykarumuri7617 6 ปีที่แล้ว +1

    Great Sir, Keep it up........

  • @VIjayKumartheh2o
    @VIjayKumartheh2o 5 ปีที่แล้ว

    Why the childEvent property is enclosed with (childEvent) while send the data from Child component to parent component??

  • @muralicse3637
    @muralicse3637 4 ปีที่แล้ว

    I have a one doubt bro... if I use routing method then how I can interact with other components?

  • @gnaresh2348
    @gnaresh2348 4 ปีที่แล้ว

    Addicted to your videos

  • @JV-vp5vl
    @JV-vp5vl 5 ปีที่แล้ว

    Hi, nice tutorial! Are parameters passed by value or by reference when interacting between components, and also when calling functions in the same component?

  • @manjunathkannur2207
    @manjunathkannur2207 4 ปีที่แล้ว

    Hello , Thanks for this session, but I wanto know whether it is possible to display @input value (which we received from parent component) only on button click. I don't wanto display it on page load..

  • @kshBCN
    @kshBCN 5 ปีที่แล้ว

    You are awesome. Thanks Vishwas

  • @eyotajr
    @eyotajr 6 ปีที่แล้ว +1

    when sending data from child to parent i can use the data without redeclaration the data on the parent..
    is there some kind side effect because i don't redeclare the data on parent that sent by the child compt?

  • @santoshbhat3868
    @santoshbhat3868 5 ปีที่แล้ว +1

    Lovely Tutorial

  • @orl123124
    @orl123124 4 ปีที่แล้ว

    great job bro I've learned a lot with your video

  • @imrohan97
    @imrohan97 3 ปีที่แล้ว

    can we use name of property different from parentData in app-component template?

  • @gomathirr2062
    @gomathirr2062 4 ปีที่แล้ว +1

    perfect explanation !!! thank you so much !!!

  • @varuns6451
    @varuns6451 6 ปีที่แล้ว +2

    Hi, nice work dude... how to pass multiple datas between components

    • @a_rob
      @a_rob 6 ปีที่แล้ว

      multiple events

    • @dincarobert8937
      @dincarobert8937 5 ปีที่แล้ว

      make a service or obj{name: 'book'}

  • @mahibeats6070
    @mahibeats6070 ปีที่แล้ว

    Thanks 👍 nice explanation

  • @krishnachaitanya7349
    @krishnachaitanya7349 4 ปีที่แล้ว

    how many types of Angular Design patterns are there? Name them

  • @optiwariindia
    @optiwariindia 4 ปีที่แล้ว

    is it possible to bind two way here

  • @polsanisandeep1706
    @polsanisandeep1706 5 ปีที่แล้ว +1

    Bro nice tutorials
    Thank You.

  • @nikhleshtaneja3615
    @nikhleshtaneja3615 5 ปีที่แล้ว +1

    from chhild cumponent ttho the ppharent khumponent ? :D

  • @mosamprajapati3515
    @mosamprajapati3515 6 ปีที่แล้ว

    Very helpful for learning angular

  • @deepumon.d3148
    @deepumon.d3148 5 ปีที่แล้ว

    Nice explanation.

  • @rajeshpeyala3689
    @rajeshpeyala3689 5 ปีที่แล้ว

    Very nice video. Thank you

  • @Neworldexport
    @Neworldexport 5 ปีที่แล้ว

    I love the way u explain, thanks a lot

  • @posamahendra8124
    @posamahendra8124 5 ปีที่แล้ว

    can you help me in component interaction, like parent component has the input field which will accept id number and name, those two fields data i need to show in child component fields with condition when i select from dropdown the child component fields are coming, now i want to show the id number and name which entered in parent component need to to display in the child component fields. plz help me as soon as possible.

  • @skilljourney6357
    @skilljourney6357 5 ปีที่แล้ว

    Thank you for the beautiful explanation

  • @keerthid4175
    @keerthid4175 3 ปีที่แล้ว

    nicely explained

  • @hiteshnagpal5171
    @hiteshnagpal5171 6 ปีที่แล้ว

    Hi, Awesome tutorials, we got here we can transfer data between parent and child, I am stucked on transferring data from child to child component, is this possible, because I tried binding and event both, it didn't work..

    • @jatinnandwani8222
      @jatinnandwani8222 4 ปีที่แล้ว

      I am facing the same problem while sending the data to the parent component, Did you get the solution.

  • @ماياالقدور
    @ماياالقدور 4 ปีที่แล้ว

    I wish you posted pdf of information you teach it in these video (series) please ......

  • @rutujagurav466
    @rutujagurav466 4 ปีที่แล้ว

    Awesome tutorial

  • @UdayNand7
    @UdayNand7 ปีที่แล้ว

    what if we want to send method from parent to child

  • @sravaninallabelli1251
    @sravaninallabelli1251 2 ปีที่แล้ว

    In this video
    data is getting from child component to parent component html file but how to get child component data directly to parent ts file please help me

  • @SowmiyaChandrasekar14
    @SowmiyaChandrasekar14 4 ปีที่แล้ว

    Can u post some videos for spring tutorials

  • @kacpersarzynski4915
    @kacpersarzynski4915 3 ปีที่แล้ว +1

    super tutorial!

  • @akshaynitin5589
    @akshaynitin5589 4 ปีที่แล้ว

    for parent to child ur passing single variable content. how could i use all declared variable in parent to child component.

  • @Iamshivpandey
    @Iamshivpandey 5 ปีที่แล้ว

    but if parent component use router-outlet for render child components then how to share data to child?

  • @babu-vp3fp
    @babu-vp3fp 3 ปีที่แล้ว

    thanks love from india

  • @karthick8810
    @karthick8810 4 ปีที่แล้ว

    what if i already have a router-outlet for child component in parent component. It will display twice after including child selector in parent component???

  • @umairali2360
    @umairali2360 6 ปีที่แล้ว +1

    sir at 03:35 i have error
    "1. If 'app-test' is an Angular component and it has 'parentData' input, then verify that it is part of this module.
    2. If 'app-test' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.", plz plz help

    • @kumark691
      @kumark691 6 ปีที่แล้ว

      Add test component in app.module.ts

    • @TeluguCartoonist
      @TeluguCartoonist 6 ปีที่แล้ว +1

      same error bro how to solve

    • @umairali2360
      @umairali2360 6 ปีที่แล้ว

      @@TeluguCartoonist dear my error was in view. and now i did not remember exactly how i solve it, because i am working on laravel

  • @inascharan
    @inascharan 2 ปีที่แล้ว

    thank you sir, now i am more confused then earlier! [just-joking!!] it was easier now, but you taught so smooth.

  • @SameerKhan-ls9ow
    @SameerKhan-ls9ow 3 ปีที่แล้ว

    I am subscribing you GOD bless you 💖

  • @BookOfSaints
    @BookOfSaints 5 ปีที่แล้ว

    Nice tutorials, but why are you not using the dedicated html file for app-test? I feel like this defeats the purpose and is harder to read.

  • @syedzishan3676
    @syedzishan3676 6 ปีที่แล้ว

    there seems to be some problem exporting data from from child to parent in angular 6 ..
    EventEmitter is now in 'events' and when i pass data from child to parent following ur tutorial it gives following warnig
    ERROR TypeError: instance[output.propName].subscribe is not a function
    i m in the middle so eagerly waiting for ur reply
    thanks in advance

    • @Codevolution
      @Codevolution  6 ปีที่แล้ว

      Please read the pinned comment now. There is a small change in the imports from version 5 to 6.

  • @harshadtibile5116
    @harshadtibile5116 4 ปีที่แล้ว

    we want subject concet..can you please upload this concept as possibile as fast

  • @digambersingh555
    @digambersingh555 6 ปีที่แล้ว +1

    Thanks for the tutorial! Awesome Job :)

  • @rohansharma4971
    @rohansharma4971 6 ปีที่แล้ว

    hi, i don't understand the part that how does $event refers to 'hey codevolution' ..

  • @pallavisharma5242
    @pallavisharma5242 3 ปีที่แล้ว

    Why are * used in angular inside html element

  • @पापानटोले
    @पापानटोले 6 ปีที่แล้ว +2

    This does not work. Saying childEvent is not a function

  • @naeemjamali1475
    @naeemjamali1475 6 ปีที่แล้ว +1

    Good job, keep it up!

  • @vikassrinivas7248
    @vikassrinivas7248 4 ปีที่แล้ว

    What if we use in app.component.html and there is no selector?
    How can I pass the data then?

    • @nellyville8657
      @nellyville8657 4 ปีที่แล้ว

      Plz how did you do with the Output EventEmitter, it doesn't work with me !

    • @nellyville8657
      @nellyville8657 4 ปีที่แล้ว

      Plz did you succed with the Output Event. It does'nt work with me