ngx-water-marker
v2.0.0
Published
angular9+ 水印背景
Downloads
1
Maintainers
Readme
ngx-water-marker
angular9+ 水印背景demo地址
1、开始使用
- 安装
- 使用
安装
npm i ngx-water-marker
使用
WaterMarkerModule
需添加到使用的module
的文件中。此处以AppModule
为例:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { WaterMarkerModule } from 'ngx-water-marker';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
WaterMarkerModule
AppRoutingModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
import { Component } from '@angular/core';
import { WaterMarkerOption } from 'ngx-water-marker';
@Component({
selector: 'app-root',
template: `
<div [cWaterMarker]="water"></div>
`,
style: [`
div {
height: 1000px;
}
`]
})
export class AppComponent {
water: WaterMarkerOption = { text: '卢西奥', setting: { fontSize: 40 } };
}