mo-radio-button
v0.0.5
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.3.0.
Downloads
3
Readme
MoRadioButton
This library was generated with Angular CLI version 13.3.0.
安装
npm i -S mo-radio-button -registry https://registry.npmjs.org
修改 SharedModule
import { MoRadioButtonModule } from 'mo-radio-button';
const MODULES = [MoRadioButtonModule]
@NgModule({
exports: [
...MODULES,
]
})
export class SharedModule {}
使用
export class SearchBarComponent {
keywords = '';
value = 1;
options = [
{ label: '全部商机', value: 1 },
{ label: '我负责的商机', value: 2 },
];
constructor() {}
radioSearch(value: number) {
consoe.log(value)
}
}
<mo-radio-button [options]="options" [value]="value" (moOnChange)="radioSearch($event)"></mo-radio-button>