1.0.1 • Published 4 years ago
rs-lib-input-masked v1.0.1
rs-lib-input-masked библиотека
Темизация в проекте
Подключаем в src/app/modules/core/scss.fragments/_form-component.scss
@import '~rs-lib-input-masked/rs-lib-input-masked-all-theme';
@include rs-lib-input-masked-all-theme($font-color-item-label);
Использование библиотеки
Подключаем модуль библиотеки (src/app/modules/core/components/core-components.module.ts)
...
import { RsLibInputMaskedModule } from 'rs-lib-input-masked';
...
@NgModule({
...
exports: [
RsLibInputMaskedModule
]
...
})
Добавляем компонент библиотеки в нужные места
Передача keyboardService в библиотеку
Подключить сервис настроек библиотеки (app.module.ts)
import { RsLibInputMaskedSettingsService } from 'rs-lib-input-masked';
@NgModule({
providers: [
RsLibInputMaskedSettingsService,
]
})
Конфигурирование библиотеки (app.component.ts)
...
import { RsLibInputMaskedSettingsService } from 'rs-lib-input-masked';
import { KeyboardService } from './modules/core/services/keyboard.service';
export class MyApp {
constructor(rsLibInputMaskedSettingsService: RsLibInputMaskedSettingsService,
keyboardService: KeyboardService) {
rsLibInputMaskedSettingsService.configLibrary({keyboardService: keyboardService});
}
}