Yes, you can do that with ng-init, though it's usually recommended to do 
that in your controller.
Here is what it would look like, though I'm not sure why you would do that 
when "name" is already accessible in your local scope:

<tr ng-repeat="name in names" ng-init="personName = name' >

On Thursday, June 18, 2015 at 8:18:39 AM UTC-7, Varun jain wrote:
>
> Hi,
>
> Is it possible to change the scope variables from my view?
>
> Here is what I am trying to do- 
>
> %tr{'ng-repeat' => 'name in names'}
>    ## Within this scope $scope.personName = name
>
>
>

-- 
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.

Reply via email to