I am looking to implement a feature in my application where users can create a favorite list based on their selection. The application utilizes a lengthy JSON file containing a multitude of text, which is loaded using $http.get()
.
Below is the code segment used to display the content in the view.
<ion-view>
<ion-nav-title></ion-nav-title>
<ion-content>
<div class="card" ng-repeat="list in items | filter: { id: whichid }">
<div class="item item-text-wrap"
ng-repeat="item in list.content | filter: { id2: whichid2 }"
ng-bind-html="item.description.join('')">
<h3>{{ item.name }}</h3>
<p>{{ item.description }}</p>
</div>
</div>
</ion-content>
The approach to creating a favorite list involves saving the displayed text in an array. Once saved, the array can be easily displayed in a template for the favorite list.
The main challenge lies in figuring out how to store the text/data from the expression
({{ item.name }}, {{ item.description }})
in the array. Alternatively, I am open to any other ideas for implementing this favorite list feature.