-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loading progress indicator #1319
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working just fine.
The loading indicator can be changed by editing |
Hey @hatemhosny, that's a great PR. Could you re-do it to use npm for dependencies and not copying the 3rd party modules into the project? |
Thank you, @nnixaa. I have changed it to use pace-js npm package. |
@hatemhosny great! Sure, here are the steps:
That's it. This way your styles will be multiplied per each theme so that they will use the variables of the current enabled theme. |
Thank you, @nnixaa for the clear guide. I have done the suggested changes (I'm not sure why it does not show here). Notes: I use the theme variable I added to the other alternative would be adding let me know what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done... I have commented it out, in case somebody wants to get it back. |
@hatemhosny awesome! Many thanks for this, merging now. Looking forward to new PRs 👍 |
What kind of change does this PR introduce?
Feature
What is the current behavior?
During navigation, there is no indicator that a network request is being made e.g API call or lazy loaded module. The user may think the app is not responding.
What is the new behavior (if this is a feature change)?
This is a an automatic loading progress bar and spinner using pace.js.
It works out of the box without the need for any manual configurations.
It automatically shows a loading progress indicator when a network request is made, without the need to explicitly call any code.
Other information:
pace.min.js
andpace-theme-flash.scss
are placed in/assets/vendors/pace/
and added to.angular-cli.json
to be loaded by angular.the color of the indicator is set in
pace-theme-flash.scss
using the theme variablenb-theme(color-fg-highlight)
refer to pace.js documentation for advanced configurations.