Tuesday, January 28, 2014

Angluar JS + c# Web API decimals not routing

For some reason when i would put/get decimal values with the angularjs $resource i would get a 404. After lots of research i found out that this is due to $resource dropping trailing slashes (more info here: http://stackoverflow.com/questions/14533117/angular-trailing-slash-for-resource ). There is talk that in angular 1.3 they will add this as an option but for now we need to use a hack.
HACK: Add "\\/" to the end of your url in the $resource. For example: return $resource('/api/pricingAgreementItem/:id/:action/:value\\/', { id: '@id' },... See below for a more complete example.
 Javascript: C#:

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.