@9hub/ngx-avatar 中文文档教程
Angular Avatar
用于获取和编辑用户头像的 Angular 库。
Prerequisites
要使用此库,您需要安装 angular-material 和 flex-layout。
使用 NPM:
npm i @angular/material @angular/cdk
npm i @angular/flex-layout
使用 Yarn:
yarn add @angular/material @angular/cdk
yarn add @angular/flex-layout
如果您安装了 angular-cli,您可以安装 angular-material,如下所示:
ng add @angular/material
如果您对 angular-material< 有任何疑问/strong> 安装,请参考getting-started。
Installing
使用 NPM:
npm i @9hub/ngx-avatar
使用 Yarn:
yarn add @9hub/ngx-avatar
Usage
您需要导入我们的模块并添加到 Angular 的主模块中。
import { NgxAvatarModule } from '@9hub/ngx-avatar'
@NgModule({
imports: [
...
NgxAvatarModule
...
]
})
在您的 Angular 模板上使用我们的组件:
<ngx-avatar [avatarSrc]="myAvatar"></ngx-avatar>
Built With
- Angular - The web framework used
- Angular Material - Material design components
- Flex Layout - Angular layout API
- CropperJs - Javascript image cropper
- Ngx Webcam - Angular webcam component
Contributors
License
这个项目是在 MIT 许可证下获得许可的 - 请参阅 LICENSE.md 文件了解详细信息
Angular Avatar
Angular library to get and edit user avatars.
Prerequisites
To use this library you need to have installed angular-material and flex-layout.
Using NPM:
npm i @angular/material @angular/cdk
npm i @angular/flex-layout
Using Yarn:
yarn add @angular/material @angular/cdk
yarn add @angular/flex-layout
If you have angular-cli installed, you can install angular-material as below:
ng add @angular/material
If you have any issue with angular-material installation, please refer to getting-started.
Installing
Using NPM:
npm i @9hub/ngx-avatar
Using Yarn:
yarn add @9hub/ngx-avatar
Usage
You need import our module and add to your Angular's main module.
import { NgxAvatarModule } from '@9hub/ngx-avatar'
@NgModule({
imports: [
...
NgxAvatarModule
...
]
})
Using our compnent on you Angular template:
<ngx-avatar [avatarSrc]="myAvatar"></ngx-avatar>
Built With
- Angular - The web framework used
- Angular Material - Material design components
- Flex Layout - Angular layout API
- CropperJs - Javascript image cropper
- Ngx Webcam - Angular webcam component
Contributors
License
This project is licensed under the MIT License - see the LICENSE.md file for details