Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 04219ad

Browse files
committed
fix(*): loader indicates http requests correct now
Fix the loading bar which is showing router navigations correct but was binding to non existent api variable. Attach the api varible to aurelia-api endpoint and adjust binding to http-client isRequesting variable from aurelia-fetch-client. --- src/view-models/app.js | 6 ++++-- src/views/app.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
1 parent 5b0c447 commit 04219ad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/view-models/app.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
import {Endpoint} from 'aurelia-api';
12
import {inject} from 'aurelia-framework';
23
import {Router} from 'aurelia-router';
34
import AppRouterConfig from '../configuration/router-config';
45
import 'jquery';
56
import 'twbs/bootstrap';
67

7-
@inject(Router, AppRouterConfig)
8+
@inject(Router, Endpoint.of(), AppRouterConfig)
89
export class App {
9-
constructor(router, appRouterConfig) {
10+
constructor(router, api, appRouterConfig) {
1011
this.router = router;
12+
this.api = api;
1113
this.appRouterConfig = appRouterConfig;
1214
}
1315

src/views/app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</header>
1010

1111
<main>
12-
<loading-indicator loading.bind="router.isNavigating || api.isRequesting"></loading-indicator>
12+
<loading-indicator loading.bind="router.isNavigating || api.client.isRequesting"></loading-indicator>
1313
<navigation-side id="sidebar" class="sidebar-nav"></navigation-side>
1414

1515
<div class="container-fluid" id="content-container">

0 commit comments

Comments
 (0)