json api callback /api/v1/items/{id}

30 views
Skip to first unread message

Tha Sophearak

unread,
May 1, 2014, 10:15:03 AM5/1/14
to ang...@googlegroups.com
what I have
http://plnkr.co/edit/2G42FzSyosuZKCzfAD79?p=preview

I want the list is linkable to detail of item. How to implement that,

Thanks for your time, I'm much appreciate all answer.

Gaurav Saini

unread,
May 2, 2014, 2:03:47 AM5/2/14
to ang...@googlegroups.com
Hello,

This is what I prepared for your book details page. You can also improve this by using state provide and resolve functions to get data before controller gets loaded. For now I have just simply implemented using routes.


Thanks
Gaurav

Tha Sophearak

unread,
May 2, 2014, 3:31:35 AM5/2/14
to ang...@googlegroups.com
That's awesome, I'll will working more on that. one quest here, by using state to provide and resolve functions to get data before controller gets loaded, what the benefit of that.

thanks,

Gaurav

unread,
May 2, 2014, 4:05:57 AM5/2/14
to ang...@googlegroups.com
Advantage of using resolve is that you will have the data coming first before the template appears.
Let me give you an example where resolve can be used. In case of getting google-maps with respect to geo location. If we have the lat and lat through geolation first then we can use that in controller to build the map. On the other hand if controller loads then first the map will be loaded as geo location will take time and then again we have to rebuild the map.

You can read about state provider and all its events at https://github.com/angular-ui/ui-router/wiki

Thanks
Gaurav
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/npi3tgt9Maw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Tha Sophearak

unread,
May 2, 2014, 4:22:58 AM5/2/14
to ang...@googlegroups.com
Thanks you for your explanation, 

I will work on it detail tonight.


Thanks,
Reply all
Reply to author
Forward
0 new messages