0.0.21 • Published 2 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
MatProgressSpinnerModule
y en app.module.ts
- 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
2 years ago
0.0.20
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.6-beta.0
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago