This might be a typo, but you're setting item.fileName on your ng-click,
and item.fileSrc is the image source attribute.

Also-also, item's not defined in that fragment you have up there. It's only
meaningful inside the ng-repeat="item in items", outside of that I'm not
sure what you'd be referencing.

e


On Mon, May 26, 2014 at 7:10 AM, Marc B <[email protected]> wrote:

> Hello,
>
> I have a img with attr ng-source="item.fileSrc".=-, The img is displayed
> because item.fileSrc contains image data. When I change the value of
> item.fileSrc to '' in a ng-click handler, the img is still shown. I expect
> it to disappear since the value for ng-source is "" after clicking the
> button.
>
> This is my code:
>
>     <tr ng-repeat-start="item in items | orderByPriority">
>         <td><img ng-src="{{item.fileSrc}}"></td>
>     </tr>
>     <tr ng-repeat-end>
>         <td>
>             <div><button type="button" class="close"
> ng-click="item.fileName=''"> &times;</button></div>
>         </td>
>     </tr>
>
> Image does not disappear, not even when adding $scope.$digest() in
> ng-click or after updating the view by adding/removing text in a text input
> field that is in the same $scope as the ng-repeat
>
> What amn I missing here?
>
>  --
> 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 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