Is it possible to use Angular JS for JAMstack architecture?

As JAMstack stands for JavaScript, API, and Markup, the only part which is a bit less straightforward to do Angular as a JAMstack is the markup.

It is possible to pre-render Angular on the server with Angular Universal: this would be the Markup part of the JAMstack. To make it a JAMstack application you would have to use build time pre-rendering instead of server-side rendering.

Angular is JavaScript obviously, so that is pretty straightforward.

And your Angular app probably already is talking to APIs, so that is easy too.

The main thing would be to build your Angular app in such a way that it works as a standalone website and serving it as static files via a CDN. Any content that needs to be dynamically updated you call via an API.

So yes, in my opinion it is possible to use Angular for JAMstack.


I'm not sure if you are talking about Angular(2+) or AngularJs(1), but anyways there is no tool that use any of those frameworks, but, here you can see all the current tools you can choose to build an app with the JAMStack

https://www.staticgen.com/

You can find some that use Jade, Handlebars for generate the templates. Maybe Angular is not present because is too big, a complete framework, and in these cases you most of all need a template helper.

So, good luck.


Things move fast in the web world, there now (since December 2019) is a Static Site Generator built in Angular: https://www.netlify.com/blog/2019/12/16/introducing-scully-the-angular-static-site-generator/

The Scully code (currently version 0.0.1 so probably not stable/production ready): https://github.com/scullyio/scully/

An explanation of JAMstack "through Angular-colored glasses": https://www.netlify.com/blog/2019/10/30/whats-angular-in-the-jamstack-it-sounds-delicious/