last day (15 days later) » 

11:54 AM
0
A: ngOnChanges on boolean assigned to checkbox change not caught

Vivek DoshiAs per your code, there is no issue, except how you use app-modes, it should be look like this : <app-modes [mode]='mode'></app-modes> WORKING DEMO

 
Change is never executed... It doesn't console anything it's not because of async await. By the way this method doesn't return promise?
 
@dopeCode, please check working demo, its same as you described in your question
 
Why do you listen for changes in child component but not inside component where input actually lays?
 
because you have used @input, and input is for child
 
Can I somehow achieve so I can listen for changes in same component? I don't have any more nested component
 
11:54 AM
OnChanges : "A lifecycle hook that is called when any data-bound property of a directive changes", in our case mode is out databind of app-modes
I have added in demo
pelase check
you can use (change)
<input type="checkbox" [(ngModel)]="mode" (change)='changed()'>
 
Oh right
Didn't think about this
Ok I'll accept your answer thanks for your time
 
Thanks
 
so this @Input what does it mean in angular?
I'm just trying to learn on new project
 
when you want to pass some value to child component
you can use that
 
So when it's caming from input and i want to pass to child then use @Input; right?
coming*
What if I want to pass something else for example some array
 
12:00 PM
parent --> child
you can pass anything , array,object,string
via input
 
aaa
so it's not related to html input srr missleading name
Ok so it's just like props in vue :D
Ok thank you once again
 
Yes
exactly
you can remove async await
there is no need of it
 
just my IDE was screaming that this method return promise
 
do use visual studio code
 
i use webStorm
 
I have full angular 8 from this maximilian on udemy but it's too long for me ;d
 
you have to spend time, if you want to get it right
or else it will get confusing as you go ahead, like as you stuck today
 
Yeah i knot :( i already know vue and react and just looking for analogies
know*
 
anyway best of luck
have a good day
 
yeah thanks bye
 

last day (15 days later) »