Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
hdastageeri
hft_awado_app
Commits
d3c5baa8
Commit
d3c5baa8
authored
Dec 08, 2019
by
Ratnadeep Rajendra Kharade
Browse files
created loading page service
parent
dc1ec17a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/services/loading.service.spec.ts
0 → 100644
View file @
d3c5baa8
import
{
TestBed
}
from
'
@angular/core/testing
'
;
import
{
LoadingService
}
from
'
./loading.service
'
;
describe
(
'
LoadingService
'
,
()
=>
{
beforeEach
(()
=>
TestBed
.
configureTestingModule
({}));
it
(
'
should be created
'
,
()
=>
{
const
service
:
LoadingService
=
TestBed
.
get
(
LoadingService
);
expect
(
service
).
toBeTruthy
();
});
});
src/app/services/loading.service.ts
0 → 100644
View file @
d3c5baa8
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
LoadingController
}
from
'
@ionic/angular
'
;
@
Injectable
({
providedIn
:
'
root
'
})
export
class
LoadingService
{
loaderToShow
:
any
;
constructor
(
public
loadingController
:
LoadingController
)
{
}
showLoader
(
message
=
'
loading...
'
)
{
this
.
loaderToShow
=
this
.
loadingController
.
create
({
message
:
message
}).
then
((
res
)
=>
{
res
.
present
();
res
.
onDidDismiss
().
then
((
dis
)
=>
{
console
.
log
(
'
Loading dismissed!
'
);
});
});
}
hideLoader
()
{
this
.
loadingController
.
dismiss
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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