I was able to fix this.
<button class="select-cust" ng-click="getcustid(cust.CustomerID)"
id="{{cust.CustomerID}}">ddd</button>
Then my function:
$scope.getcustid = function (val) {
$scope.meval = val;
}
Thanks All.
On Sat, Aug 16, 2014 at 4:14 AM, Christian Nwamba <[email protected]
> wrote:
> Eric thanks. Please i didn't really get your idea. Can you explain the
> concept with my provided code.
>
>
>
> On Fri, Aug 15, 2014 at 1:45 PM, Eric Eslinger <[email protected]>
> wrote:
>
>> put something like selectedCustomerId on the parent scope (I generally
>> have a view object, so I attach stuff like that to
>> view.selectedCustomerId), and then in the getcustid() function, do
>> something like $scope.view.selectedCustomerId = 123
>>
>> e
>>
>>
>> On Fri, Aug 15, 2014 at 12:47 PM, Christian Nwamba <
>> [email protected]> wrote:
>>
>>> The problem is that the text box is not in the ng-repeat. I needed to
>>> pass the value once the use clicks on the row
>>>
>>>
>>> On Fri, Aug 15, 2014 at 8:43 AM, Naveen Kohli <[email protected]>
>>> wrote:
>>>
>>>> <input id="searchCust" type="text" ng-model="cust.CustomerID"
>>>> class="form-control" />
>>>>
>>>>
>>>> On Fri, Aug 15, 2014 at 7:55 AM, Christian Nwamba <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi folks
>>>>> I have this:
>>>>> <input id="searchCust" type="text" ng-model="meval"
>>>>> class="form-control" />
>>>>> <div class="table-responsive">
>>>>> <table class="table">
>>>>> <thead>
>>>>> <tr>
>>>>> <th>Contact Name</th>
>>>>> <th>Company Name</th>
>>>>> <th>ID</th>
>>>>>
>>>>> </tr>
>>>>> </thead>
>>>>> {{custo}}
>>>>> <tbody>
>>>>> <tr ng-repeat="cust in customers">
>>>>> <td>{{cust.ContactName}}</td>
>>>>> <td>{{cust.CompanyName}}</td>
>>>>> <td>{{cust.CustomerID}}</td>
>>>>> <td><button ng-click="getcustid()"
>>>>> class="select-cust-to-sell-to" id="{{cust.CustomerID}}">ddd</button></td>
>>>>> </tr>
>>>>> </tbody>
>>>>> </table>
>>>>> </div>
>>>>> i need to set the value of CustomerID to #searchCust textbox.
>>>>> Please how can i achieve this.
>>>>> Thanks
>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>>
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/angular.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Naveen K Kohli
>>>> http://www.netomatix.com
>>>>
>>>> --
>>>> 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/VcU7_nNA_Bc/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>>
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/angular.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/angular.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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/VcU7_nNA_Bc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.