Tag: angular

  • Passing configuration to Angular

    This is something that we got wrong on our project initially, then had a guy named Mark come on board and nail a very clean solution. What we were trying to accomplish: we wanted to give our Angular Singe Page App some configuration data for initialization. Things like a CSRF token and API URL, so […]

  • Angular’s $http.error()

    Earlier I promised (ha! PROMISE!) to explain why I don’t like Angular’s $http.success() and .error() but this guy beat me to the punch: Don’t use $http’s .success() First, I hate anything that creates inconsistency in my code. If we use success() we’ll still have to use then() in every other place that has a promise, […]

  • RESTful responses and Angular

    Testing for an empty JSON document I have a RESTful service that performs a search and returns the results as JSON, and if there’s no results I return an empty document, {}. Now I don’t know what the original author’s situation is or how much control they have over the API they’re consuming, but I […]