I'm using this Emberjs template http://www.asp.net/single-page-application/overview/templates/emberjs-template to make an ember application inside asp .net. I have developed some basic web api's using asp.net web api, but how would I call these POST, GET, etc methods from the ember application? i.e. How would I connect my ember controller, models and views to this asp .net back-end?
5
votes
This fellow has a Code Project article with a complete example that explains how to do it: codeproject.com/Articles/511031/…
– Robert Harvey
Additionally ansh, I wrote a precompiler for handlebars templates in asp.net which may prove useful. nuget.org/packages/HandlebarsHelper github.com/kingpin2k/HandlebarsHelper
– Kingpin2k
2 Answers
2
votes
I blogged this issue over here http://www.emadibrahim.com/2014/04/09/emberjs-and-asp-net-web-api-and-json-serialization/ this works for GETs but working on a custom model binder to make it work for POSTs and PUTs - I will update my answer when done.
1
votes
Have a look at the Ember.js getting started guide. After you have your application set up, you could use Ember Data to communicate with your back end. If you follow conventions it's as easy as swapping out your adapter for DS.RESTAdapter