How to connect the database to ember

@Sri_vijay_kalki sure, you can see examples in the guides here: Specifying a Route's Model - Routing - Ember Guides

Basically, an Ember route has an optional model hook that can either return static data or handle any type of dynamic querying. If you query your backend in the model hook, a lot of the complexity of handling async is handled for you automatically by Ember. If you want more control over how the screen loads and feels beyond what Ember handles out of the box with the model hook and loading states, then it’s worth looking at ember-concurrency as an upgrade.

A good write up on some of the pros/cons on that can be found here: Readers' Questions - "Is it bad to load data in components?" - #8 by Parry

1 Like