Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Programming and Learning from SD

I showed $.ajax at lunch yesterday and I've put up my code on github. There’s a simple javaScript class example and a Knockout example for comparison. I also avoided using jQuery (except for the $.ajax).

I also added a knockout example to you can compare a simple example.

Getting WebApi setup threw me for a loop. Use GlobalConfiguration.Configure(WebApiConfig.Register).

Also I needed some help to post a primitive value to a WebApi method.


EDIT: August 25, 2015: I updated my AjaxExample using a data service class and TypeScript. I wanted to share a simple example using TypeScript and moving the AJax calls into a “data service class”. I think I’ll add in a stuffDataService.ts for in the middle and a non jQuery ajax example to show you might not need jQuery.

Posted on Wednesday, August 19, 2015 6:12 PM WebApi , JavaScript | Back to top

Comments on this post: $.ajax and WebApi example

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Aligned | Powered by: