In talking with customers and partners about AEM Apps, one of the most frequently asked questions I hear is “If I want to build a hybrid mobile app with AEM Apps, do I need to use AngularJS?” Or sometimes this gets phrased as “Why do I need to use AngularJS to build hybrid apps with AEM Apps?” Or even “Why are you guys so in love with AngularJS? We’d rather use <fill in the blank>.” So let me start by saying that no, there’s no requirement to use AngularJS for hybrid app development with AEM Apps. There was one place where using AngularJS was highly beneficial, but that’s actually not the case anymore and I’ll come back to this later.
So where did this misconception come from? First and foremost, it comes from the pretty obvious fact that the hybrid sample application we ship with AEM Apps (Geometrixx Outdoors) uses AngularJS. And we do provide some specific utilities for building and exporting AngularJS views into a hybrid application. But the sample app is just that – a sample and those utilities are specifically there to make AngularJS application management easier. Neither is meant to suggest a requirement to use AngularJS. At the end of the day (or, in this case, the beginning of the day), we had to choose something. If we chose ReactJS, odds are we would have this same misconception, just about ReactJS instead of AngularJS.
So no, you don’t have to use AngularJS.
Except for one little thing…
If you have already built a hybrid app using AEM Apps, updating it to use the new Content Sync plugin is simply a matter of adding the new plugin to your config.xml file and updating a few client library references. Examples of the changes can be found here and here. I’ve also updated my Anatomy of a Hello World App document (described here) to reflect these changes.
With the release of Feature Pack 2, we should remove any doubt that you must use AngularJS with AEM Apps. And if you still have doubts, let me know in the comments and we’ll try to clear up any outstanding misconceptions.