How to push data to array in factory/service (IONIC)


#1

Hi All.
I want to create an app that work like this : http://codepen.io/harked/pen/Qbryga

As you can see, when we click favorite button, the item will store in factory and we can invoke in another page (favorite page.)

In my case : i use service to store the item data and create factory to store the pushed item.
You can look at my pen here : http://codepen.io/harked/pen/WvJQWp

But when i click the favorite button, the item dont show in another page.
Is it possible to do like this in Ionic app?