<div id="theFirstgrid" >
              <docs-grid [forParent]="'theFirstgrid'"></docs-grid>
          </div>

 <div id="theSecondgrid" >
              <docs-grid [forParent]="'theSecondgrid'"></docs-grid>
          </div>

On Friday, May 27, 2016 at 12:44:24 AM UTC+5:30, Ofer Gal wrote:
>
> Not sure I understand.
> Say the HTML on the parent component has the first child embedded like 
> this:
>           <div id="theFirstgrid" >
>               <docs-grid ></docs-grid>
>           </div>
> and the second like this:
>           <div id="theSecondgrid" >
>               <docs-grid ></docs-grid>
>           </div>
>
> How can I tell the component who's selector is 'docs-grid' that it was 
> embedded in the div "theFirstgrid" and not "theSecondgrid"
>
>
> On Thu, May 26, 2016 at 1:13 PM, 'Manish Pal' via AngularJS <
> ang...@googlegroups.com <javascript:>> wrote:
>
>> why not pass that as input to the component, instead of the component 
>> trying to reach out to it's parent to find it ?
>>
>> On Thursday, May 26, 2016 at 10:27:38 PM UTC+5:30, Ofer Gal wrote:
>>>
>>> I am using the same component in 2 different places in a parent 
>>> component 
>>> Each instance is sounded by a DIV with different ID 
>>> In the component, I need to know the div ID to determine the data source 
>>> for it.
>>>
>>> Is there like in jQuery a Parent of the current component I can get the 
>>> ID with?
>>>
>>> Thanks
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/angular/npj82d_7n9w/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> angular+u...@googlegroups.com <javascript:>.
>> To post to this group, send email to ang...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Ofer Gal
>
>
> ---------------------------------------------------------------------
> לפני הפצת שרשרת, נא מחקו את שמי וכתובתי מהדוא"ל,
>  כדי שהפרטים לא יגיעו לחורשי מרעין בישין ברחבי האינטרנט
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to