Ngx-admin: New module keeps loading

Created on 28 Feb 2018  Â·  13Comments  Â·  Source: akveo/ngx-admin

Only root pages module works. Other modules when added to routes, dont load. Spinner keeps showing

needs docs question

Most helpful comment

Hello,
I have same problem with all the pages that are outside "the theme layout"
I had to add :

ngOnInit() { // In the ngOnInit() or in the constructor
    const el = document.getElementById('nb-global-spinner');
    if (el) {
      el.style['display'] = 'none';
    }
}

You have to do it manually because NbSpinnerService.hideSpinner() is private.

I did not understood where akveo hide the spinner in there code to do like them.

All 13 comments

Hi @mo-norant, can you reproduce this on a fresh install of ngx-admin?

I have same problem.

The spinner just not hides. If i delete the spinner from the object inspector the page is there.
Seams like hideSpinner function is not called in in some cases.

The strange think is that sometimes is called but if you refresh the page with F5 its just keeps spinning.

I fond what may cause this at that post #1289

Hello,
I have same problem with all the pages that are outside "the theme layout"
I had to add :

ngOnInit() { // In the ngOnInit() or in the constructor
    const el = document.getElementById('nb-global-spinner');
    if (el) {
      el.style['display'] = 'none';
    }
}

You have to do it manually because NbSpinnerService.hideSpinner() is private.

I did not understood where akveo hide the spinner in there code to do like them.

@GianlucaRi here it is https://github.com/akveo/nebular/blob/master/src/framework/theme/components/layout/layout.component.ts#L336. But basically, wrap every page with nb-layout is a requirement.

Perhaps the following will help you. I did not hide the download that is installed in index.html. I was helped by the transfer to the very end of after the spinner

Hello,
I have same problem with all the pages that are outside "the theme layout"
I had to add :

ngOnInit() { // In the ngOnInit() or in the constructor
    const el = document.getElementById('nb-global-spinner');
    if (el) {
      el.style['display'] = 'none';
    }
}

You have to do it manually because NbSpinnerService.hideSpinner() is private.

I did not understood where akveo hide the spinner in there code to do like them.

this doesnt work for me, when i implements this method in my component, when i load the page, all the styles about the components is blank, it is like no style about nebular modules.

Needs to add <nb-layout_ style="display: none"></nb-layout> somewhere in the HTML of page:

This works for me:

<div>
...
<div>
<nb-layout style="display: none"></nb-layout>

I solved the problem, i used

<nb-layout> <nb-layout-column> your component code here <nb-layout-column></nb-layout>

Then, the load about nginx loads normally

Hello,
I have same problem with all the pages that are outside "the theme layout"
I had to add :

ngOnInit() { // In the ngOnInit() or in the constructor
    const el = document.getElementById('nb-global-spinner');
    if (el) {
      el.style['display'] = 'none';
    }
}

You have to do it manually because NbSpinnerService.hideSpinner() is private.

I did not understood where akveo hide the spinner in there code to do like them.

This works for me.

Works like charm ✨
Spinner kept spinning on home page, but #1289 resolved it. Thank you 💚

Hello,
I have same problem with all the pages that are outside "the theme layout"
I had to add :

ngOnInit() { // In the ngOnInit() or in the constructor
    const el = document.getElementById('nb-global-spinner');
    if (el) {
      el.style['display'] = 'none';
    }
}

You have to do it manually because NbSpinnerService.hideSpinner() is private.

I did not understood where akveo hide the spinner in there code to do like them.

Thanks worked great for me 💯

I'm still not able to get this working,
I've just setup up ngx-admin starter kit, I can run it locally, but as soon as I create a new component and add it to the declaration and import sections of the app.module.ts file I get the the loading icon. If I remove the declaration and import I see the dashboard again.

I've tried wrapping the new component's component.html code with the 'nb-layout' tag and I have tried updating the 'ngOnInit' code, neither works :*(

I and my friends are also facing the same loader problem.
There is some API for api.hubspot.com and it just doesn't respond 200 OK.
For me, it was not working and it just worked the next day.
I'm not sure what's the issue here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PatrickHuetter picture PatrickHuetter  Â·  3Comments

AZm1n picture AZm1n  Â·  4Comments

xandatspain picture xandatspain  Â·  3Comments

mignam picture mignam  Â·  3Comments

nsankaranarayanan picture nsankaranarayanan  Â·  3Comments