rbo-lib
v1.4.1
Published
Projeto Lib Angular
Readme
RBO LIB
Este pacote foi gerado com Angular CLI versão 7.2.0.
Sumário
Dependências
"peerDependencies": {
"angular-imask": "6.0.4",
"ngx-toastr": "10.1.0",
"@auth0/angular-jwt": "2.1.2",
"rxjs": "6.3.3",
"primeng": "7.1.3",
"primeicons": "1.0.0",
"underscore": "^1.10.2"
}Instalações
imask:
npm install [email protected] -E --saveINFO: https://www.npmjs.com/package/angular-imask
import { IMaskModule } from 'angular-imask';
@NgModule({
imports: [
...,
IMaskModule
],
...
}) {...}toastr:
npm i [email protected] -E --save@angular/animations package is a required dependency for the default toast
npm install @angular/[email protected] -E --saveINFO: https://www.npmjs.com/package/ngx-toastr
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';
@NgModule({
imports: [
...,
BrowserModule,
BrowserAnimationsModule,
ToastrModule.forRoot(),
],
...
}) {...}"styles": [
...,
"node_modules/ngx-toastr/toastr.css",
]auth0:
npm i @auth0/[email protected] -E --saveINFO: https://www.npmjs.com/package/@auth0/angular-jwt
primeng:
npm install [email protected] -E --savenpm install [email protected] -E --savenpm install @angular/[email protected] --save"styles": [
...,
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeng/resources/primeng.min.css",
]Configurações
Configuração 1: Referenciar base_url no app.component.ts
ngOnInit() {
this.environmentService.baseUrl = environment.base_url
}Exemplos
Exemplo 1: Toastr de concluído.
import { RboToastrService } from 'rbo-lib';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(
private rboToastr: RboToastrService
){ }
ngOnInit(): void {
this.rboToastr.actionForSuccess()
}
}Melhorias
Correções
Licença
ISC
