DEV Community

Cover image for Create powerful fast pre-rendered Angular Apps using Scully static site generator

Create powerful fast pre-rendered Angular Apps using Scully static site generator

Danny Koppenhagen on January 01, 2020

Create powerful fast pre-rendered Angular Apps using Scully static site generator You probably heard of the JAMStack. It's a new way of ...
Collapse
 
fyodorio profile image
Fyodor

Hi Danny! Great post, thanks πŸ‘ Scully looks awesome!
I have a question about fetching dynamic data from JSON API: how can we populate the resulting <path>/scully-blog/dist/static/books/9783864903571/index.html file with data from the API? That is, actually, create a page from this data, not only a route with the slug.

Collapse
 
dkoppenhagen profile image
Danny Koppenhagen

Hey, you will handle this like in a common Angular app: create a service that requests your api and fill the template.
Scully will only request the api to identify all placeholders to find all routes. When running scully it will visit all the route by using the Chrome browser and your angular app built with ng build. The result is stored from scully as static html which can be served and accessed immediately with angular bootstrapping in the background.

Collapse
 
fyodorio profile image
Fyodor

Great! Thanks, I’m gonna try that πŸ‘