It should be straight forward:
<img alt="{{item.shortname}}" title="{{item.shortname}}" src="somwhere" />
Are you sure item is on the scope? Also, you're example looks busted:
title=" Photo " + {{item.shortname}} should be title="Photo {{item.shortname}}"
Raul
On Aug 8, 2014, at 12:29 PM, Steve Husting <[email protected]> wrote:
> Since this is going to be a mobile application, the alt and title tags are
> not relevant. But I would assume they will be used on a desktop site.
>
> On Friday, August 8, 2014 8:11:30 AM UTC-7, Steve Husting wrote:
> No, those aren't listed in the API at https://docs.angularjs.org/api so they
> didn't work for me. Thanks for the idea!
>
> On Thursday, August 7, 2014 10:49:40 PM UTC-7, Darshan Joshi wrote:
> Hi,
>
> Try to use data-ng-alt and data-ng-title. Of-course you can use same without
> data- prefix.
>
>
> On Friday, August 8, 2014 3:45:06 AM UTC+5:30, Steve Husting wrote:
> As can be seen by the screen grab of one line of code, I'm trying to
> correctly format an <img's alt="Photo of {{item.shortname}}"> and title="
> Photo " + {{item.shortname}}, but with no success -- "Photo of" shows up but
> no item.shortname. The data pulls correctly from data.json with <img
> ng-src="images/{{tem.shortname}}.jpg"
>
> What is the correct syntax to use to make the {{item.shortname}} work for alt
> and title tags?
>
> --
> 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.