Jungster 4.8.2 응용 프로그램에 spinnner ngx-loading을 설치하는 단계를 보내면 오류가 발생하지 않으며 괜찮아 보이지만 회 전자를 페인트하지는 않습니다.ngx-loading, Angular 4. Jipster 4.8.2. No Spinner
설치 : app.module.ts에서
npm install --save ngx-loading
:
import { LoadingModule } from 'ngx-loading';
....
imports: [
BrowserModule,
LayoutRoutingModule,
Ng2Webstorage.forRoot({ prefix: 'jhi', separator: '-' }),
Crm482SharedModule,
Crm482HomeModule,
Crm482HomeRRHHModule,
Crm482PrlModule,
Crm482MainModule,
Crm482AdminModule,
Crm482AccountModule,
Crm482EntityModule,
SimpleNotificationsModule.forRoot(),
LoadingModule
// jhipster-needle-angular-add-module JHipster will add new module here
],
main.component.html :
<simple-notifications [options]="optionsNotifications"></simple-notifications>
<ngx-loading [show]="loading" [config]="{ backdropBorderRadius: '14px' }"></ngx-loading>
<jhi-page-ribbon></jhi-page-ribbon>
<div>
<router-outlet name="navbar"></router-outlet>
</div>
<div class="container-fluid">
<!--I tried to put it here and it's not going-->
<div class="card jh-card">
<router-outlet></router-outlet>
<router-outlet name="popup"></router-outlet>
</div>
<jhi-footer></jhi-footer>
</div>
내 컨트롤러 :
export class MyControllerComponent implements OnInit, OnDestroy {
public loading = false;
......
ngOnInit() {
this.loading = true;
....
는 NGX 로딩 패키지이며, 귀하의 요청을 모두 사용 HttpClientModule 또는 HttpModule? HttpClientModule은 HttpModule로 만들어진 요청을 볼 수 없으며 그 반대의 경우도 마찬가지입니다. – Alex
스피너는 this.loading = true를 넣으면 활성화됩니다. 내가 this.loading = false에 놓으면 활성화됩니다. . 예제에 따르면. "HttpClientModule 또는 HttpModule"에 의존하는지 확신합니까? –