0.0.21 • Published 3 years ago
sof-shared v0.0.21
Sof-Shared
This library was generated with Angular CLI version 13.1.0.
Usage styles
- Instalar paquete
npm i sof-shared - Modificar angular.json de la aplicacion para que tome los estilos del package
"styles": [
"./node_modules/sof-shared/assets/style.scss"
]- 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
- 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>- 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;
});
}
}- Agregar
MatProgressSpinnerModuley en app.module.ts
- Importar
SofSharedModuleen 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