I have a simple repeater setup like so
<ion-item ng-repeat="location in data.posts">
{{location.title}}
</ion-item>
And of course for every array I get a title inside an ion-item. Now for the tricky stuff.
data
is coming from some JSON
I'm pulling in. I want to access something deeper into the array but I don't know how to get it. In javascript I would access it as
location['custom_fields']['coupon_relationships']
Which coupon_relationships
is another array for any amount of items. I merely want to be able to count the amount of items in there and print out the integer. Then I want to do logic so that the word coupons follows unless there is only 1 at which point I want the word to be coupon. I know I can do this all via javascript but I'm trying to learn the features of AngularJS. Is all this possible via Angular html?