Tag Archives: angularjs

AngularJS load bar for VisualForce remoting

While there are modules out there to automatically add loading bars using angular http interceptors, when using VisualForce remoting, the actual retrieval of data is deferred to visual force, effectively hiding the request. So, how do you show a loading bar when using this technology? Or how do you deal with multiple directives that all call remoting methods at the same time and are asynchronous? Here’s one way… Continue reading “AngularJS load bar for VisualForce remoting” »

Effectively working with AngularJS in and out of Salesforce

So we were creating an AngularJS app as the front-end for a Salesforce community. We used VisualForce remoting to get the data while in Salesforce. But we didn’t want to muck around having to constantly deploy assets into Salesforce during development. So, we came up with a pretty effective way of allowing front-end designers/dev’s to work outside of salesforce without having to modify the app when it was plugged into salesforce. Here’s how… Continue reading “Effectively working with AngularJS in and out of Salesforce” »

Unit tests for angular services

I’m trying to follow john papa’s excellent angular design principles article. One aspect to this is setting up routes that resolve service calls that can immediately be called by controllers using the ‘controllerAs’ syntax. However, the question arises of how to test these? After trawling round loads of different articles, I’ve cobbled together a solution that works (for better or worse).

Continue reading “Unit tests for angular services” »

Securing a REST API for AngularJs in Symfony

This post is a continuation of this one about setting up FOSRestBundle. The issue is that by default, the REST API that is created is accessible to anyone. For my angularjs app though, I only want the app to be able to access the API, no one else. Otherwise, external sites could hi-jack my API to get data from providers like Amazon. Since these usually have some kind of throttle on them, the API needs securing.

Continue reading “Securing a REST API for AngularJs in Symfony” »

Leafletjs maps for Umbraco 7

I’ve been working on a mapping property editor for Umbraco 7 recently that allows users to pick a location and zoom, or do an address lookup. Since users of the front-end website will see open street map tiles when they publish their pages, I thought it’d make sense to also show them the same style map in the back-office when they’re actually creating it. I learnt a few bits and pieces about angularjs directives here as well. Grab the code here if you like and read on.

Continue reading “Leafletjs maps for Umbraco 7” »