Hi, I would like to ask how I can access ng-model in item level (comment part) ?
<div custom-select="t as t.name for t in people | filter: { name: $searchTerm }" ng-model="person">
<div class="pull-left" style="width: 40px">
<img ng-src="{{ t.picture }}" style="width: 30px" />
</div>
<div class="pull-left">
// Here I would like to access person that is binded as ng-model
// if I output {{ person.name }} than it's empty
<strong>{{ t.name }}</strong><br />
<span>{{ t.phone }}</span>
</div>
<div class="clearfix"></div>
</div>
Hello.
The directive creates a child isolated scope, that's why the parent's scope property is not available directly in the item template. You could try with {{ $parent.person.name }}; that should work.
Hi, I would like to ask how I can access ng-model in item level (comment part) ?