0.0.21 • Published 3 years ago

sof-shared v0.0.21

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Sof-Shared

This library was generated with Angular CLI version 13.1.0.

Usage styles

  1. Instalar paquete npm i sof-shared
  2. Modificar angular.json de la aplicacion para que tome los estilos del package
"styles": [
    "./node_modules/sof-shared/assets/style.scss"
]
  1. En caso de que no tome los estilos, reiniciar la aplicacion (bajar y levantar con ng serve)

Build

Run ng build sof-shared to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build sof-shared, go to the dist folder cd dist/sof-shared and run npm publish.

Running unit tests

Run ng test sof-shared to execute the unit tests via Karma.

HTTP Loading interceptor

  1. app.component.html
<div *ngIf="loading" class="loading-container flex-content-center">
    <mat-progress-spinner
      color="primary"
      mode="indeterminate">
    </mat-progress-spinner>
</div>

<router-outlet></router-outlet>
  1. app.component.ts
export class AppComponent implements OnInit{
 
  loading: boolean = false;
  constructor(private loadingService: LoadingService) {}

  async ngOnInit() {
    this.loadingService.loadingSub
    .subscribe((loading) => {
      this.loading = loading;
    });
  }
}
  1. Agregar MatProgressSpinnerModule y en app.module.ts
  1. Importar SofSharedModule en app.module.ts o implementar el interceptor de la siguiente forma:
providers: [ 
  {
    provide: HTTP_INTERCEPTORS,
    useClass: LoadingInterceptor,
    multi: true
  }
]
0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.6-beta.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago