I want to create a site using assemble, yeoman, and angularJS. The plan is that assemble will handle content and AngularJS will handle dynamic content via a REST API. Are the two compatible, is this a good choice of architecture? My concern is with the templating engine Assemble uses (HandleBars) and whether it is compatible with AngularJS as they both seem to use {{}}. I have only started investigating but am struggling to find examples of people using a similar architecture. How do i scaffold with Yeoman?
Use our fast, simple, and powerful Angular static site generator, and build powerful pages, template based websites or web apps.
The pre-render feature provided with Angular Universal allows you to quickly and easily transform an Angular application into a static website. The two main benefits are: better indexing for search engines and speed of your site (which is also a factor for search engines).
Angular uses dynamic queries ( static: false ) by default, which simplifies queries. Developers can still explicitly set a query to static: true if necessary.
Benefits of using a static site generator Static sites' advantages include speed, security, and SEO. They're also easy to maintain and highly scalable. Because the static site generators (SSG) store an already-compiled page on a CDN, they load a lot faster.
I'm doing something similar and to handle the issue with the template delimiters I use the angular interpolateProvider to change the delimiters for angular.
var app = angular.module('app', []).config(function ($interpolateProvider) {
$interpolateProvider.startSymbol('{%');
$interpolateProvider.endSymbol('%}');
});
I'm not sure if you can configure Yeoman to automatically use the new delimiters when running some of the scaffolds, but I hope this helps separate your templates from the assemble templates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With