I have a nested directive. I need to access the value selected in child directive from parent directive.
-
I think you will end up having to go the other direction - from the child to the parent. Check out this answer for more details of how to accomplish this.Lex– Lex2016-04-03 17:18:37 +00:00Commented Apr 3, 2016 at 17:18
-
I am using ES6 for JS. Can you please help me in that way?Puneet– Puneet2016-04-03 17:21:42 +00:00Commented Apr 3, 2016 at 17:21
-
Try implementing the general idea in that answer and then update your question with samples of your code and what you are having problems with and someone will likely be able to help. You are unlikely to find anyone willing to write your code for you, though.Lex– Lex2016-04-03 17:27:40 +00:00Commented Apr 3, 2016 at 17:27
-
Yes, I know that. Actually my code is bit messy as of now. Will try and let you know. But is this the only way to do it? Can't I access child scope instead of modifying parent scope in child?Puneet– Puneet2016-04-03 17:40:55 +00:00Commented Apr 3, 2016 at 17:40
-
don't create an isolated scope for child. then they will share the scope. have a look at this: undefinednull.com/2014/02/11/…Ataur Rahim Chowdhury– Ataur Rahim Chowdhury2016-04-03 17:49:25 +00:00Commented Apr 3, 2016 at 17:49
|
Show 1 more comment