Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
d77f79e7
Commit
d77f79e7
authored
7 years ago
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait on API to load UI
parent
fb5ed9b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
app.component.html
Breeze.UI/src/app/app.component.html
+2
-1
app.component.ts
Breeze.UI/src/app/app.component.ts
+9
-0
No files found.
Breeze.UI/src/app/app.component.html
View file @
d77f79e7
<router-outlet></router-outlet>
\ No newline at end of file
<div
*
ngIf=
"loading"
>
Loading...
</div>
<router-outlet
*
ngIf=
"!loading"
></router-outlet>
This diff is collapsed.
Click to expand it.
Breeze.UI/src/app/app.component.ts
View file @
d77f79e7
...
...
@@ -3,6 +3,9 @@ import { Router } from '@angular/router';
import
{
ApiService
}
from
'./shared/services/api.service'
;
import
'rxjs/add/operator/retryWhen'
;
import
'rxjs/add/operator/delay'
;
@
Component
({
selector
:
'app-root'
,
templateUrl
:
'./app.component.html'
,
...
...
@@ -13,8 +16,14 @@ export class AppComponent implements OnInit {
constructor
(
private
router
:
Router
,
private
apiService
:
ApiService
)
{}
private
errorMessage
:
any
;
private
responseMessage
:
any
;
private
loading
:
boolean
=
true
;
ngOnInit
()
{
this
.
apiService
.
getWalletFiles
().
retryWhen
(
errors
=>
errors
.
delay
(
2000
)).
subscribe
(()
=>
this
.
startApp
());
}
startApp
()
{
this
.
loading
=
false
;
this
.
router
.
navigate
([
'/login'
]);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment