Add new header 2.0 component with loading service
Introduced Header2Component with a new design, external resource links, and a loading progress bar. Added LoadingService to manage loading state and integrated it into the schedule component. Updated main layout to use the new header and included related assets for external links. Changed API base URL in HttpService to use the production endpoint.
This commit is contained in:
18
src/app/loading.service.ts
Normal file
18
src/app/loading.service.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class LoadingService {
|
||||
private _loading = new BehaviorSubject<boolean>(false);
|
||||
readonly loading$ = this._loading.asObservable();
|
||||
|
||||
show() {
|
||||
this._loading.next(true);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this._loading.next(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user