angular-loading-bar
angular-loading-bar copied to clipboard
How to switch loading bar condition based on views in angular js
What version of angular-loading-bar are you using? angular-loading-bar v0.9.0
What version of angular are you using? I am using AngularJS v1.5.8
What is the issue ? Right now i have added cfpLoadingBar in my app.config file., it is coming to all the page prior loading. It is ok.
but I want the spinner loading bar to all the page except few other views. I have 4 views used in application.
- Home page view
- Detail page view
- Contact page view
- About Us page view
I want spinner loading to contactus & aboutus page.
means "cfpLoadingBarProvider.includeSpinner = true;
"
and for Home page and details page I want to set template to show the welcome message HTML.
means " cfpLoadingBarProvider.spinnerTemplate = "<p>Welcome to my site</p>;"
"
How can I handle single angular loading bar with different condition can you help me on this. is there any possibility?
What did you expect to happen?
- Home page view - it should come with "welcome message"
- Detail page view - it should come with "welcome message"
- Contact page view - it should come with spinner as usual
- About Us page view - it should come with spinner as usual
If not, then show me different way how to add condition to full fill my query.. What actually happened? Right now, spinner loader coming to all the page views same, I want to differentiate based on views.
Hi,
From what I understand, angular config is setup once during module initialisation. Hence I think you will bot be able to modify or control it's behaviour dynamically.
Regards, Nitin
On Oct 26, 2016 12:39 PM, "Abhi" [email protected] wrote:
What version of angular-loading-bar are you using? angular-loading-bar v0.9.0
What version of angular are you using? I am using AngularJS v1.5.8
What is the issue ? Right now i have added cfpLoadingBar in my app.config file., it is coming to all the page prior loading. It is ok.
but I want the spinner loading bar to all the page except few other views. I have 4 views used in application.
- Home page view
- Detail page view
- Contact page view
- About Us page view
I want spinner loading to contactus & aboutus page. means "cfpLoadingBarProvider.includeSpinner = true;" and for Home page and details page I want to set template to show the welcome message template. means " cfpLoadingBarProvider.spinnerTemplate = "Welcome to my site;" "
How can I handle single angular loading bar with different condition can you help me on this. is there any possibility?
What did you expect to happen?
- Home page view - it should come with "welcome message"
- Detail page view - it should come with "welcome message"
- Contact page view - it should come with spinner as usual
- About Us page view - it should come with spinner as usual
What actually happened? Right now spinner coming to all the page views
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chieffancypants/angular-loading-bar/issues/333, or mute the thread https://github.com/notifications/unsubscribe-auth/ATeo6ryq61fkPkoVNd78NY_1e1Y3CKnBks5q3vypgaJpZM4Kg1CP .
@nitinsaxena27 you are right. it doing config time..
How can I do? can you tell me some tips & tricks?
Thank you.
Trick is you can use the same spinner template in your main html file and control it's visibility using Ng if and bind it to a model which is set in the controller. This will mimic the same behaviour. Cheers.
On Oct 28, 2016 3:51 PM, "Abhi" [email protected] wrote:
@nitinsaxena27 https://github.com/nitinsaxena27 you are right. it doing config time..
How can I do? can you tell me some tips & tricks?
Thank you.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chieffancypants/angular-loading-bar/issues/333#issuecomment-256887158, or mute the thread https://github.com/notifications/unsubscribe-auth/ATeo6hp0TuO-3pykIdGXubyYj3l-WdjPks5q4cy2gaJpZM4Kg1CP .