Using Bootstrap’s Progress Bar When Data Is Loading

In a traditional application, where the views are generated on the server, you get a reasonable user experience during slow-loading pages for free. Most browsers have some sort of loading animation or messaging while the page is being rendered. It’s not great, but it’s something.

When making heavy use of a front-end framework like Angular, we no longer get that bit of UI. As we are seeing with the customer detail page, there’s no indication that anything is happening. It may appear to users that the app is broken or hung. We’d like to fix that.

There are two things we’ll need to do. First, we need to know how to detect if the Ajax call is still in progress or if it’s completed. We’ll use ...

Get Rails, Angular, Postgres, and Bootstrap now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.