1.0.2 • Published 7 years ago

pf-ngx-alert v1.0.2

Weekly downloads
12
License
MIT
Repository
-
Last release
7 years ago

NgxAlert

NgxAlert

安裝

npm install pf-ngx-alert

引用

app.module.ts

...something...
import { NgxAlertModule } from 'pf-ngx-alert';

@NgModule({
  ...something...
  imports: [...something..., NgxAlertModule],
  ...something...
})
export class AppModule {}

app.component.html

<ngx-alert></ngx-alert>

快速上手

ng g c Test

test.component.html

<button (click)="alert()">ALERT</button>

test.component.ts

import { ngxAlert } from 'pf-ngx-alert';

export class TestComponent implements OnInit {

  constructor() { }

  ngOnInit() { }

  alert() {
    ngxAlert(
      'Title', /* Title */
      'Message', /* Message */
      'success' /* Type */
    ).then(result => {
      /* Do something... */
    });
  }
}

Required


ArgumentRequiredDefault valueTypeDescription
ngxTitleyesnonestring標題
ngxMessageyesnonestring內容
ngxTypeyes (successerrorconfirm)nonestring類型

Option


ArgumentRequiredDefault valueTypeDescription
backgroundColorno#fffdebstring背景色
submitBtnColorno#005dbdstring確認按鈕顏色
closeBtnColorno#ffffffstring取消按鈕顏色
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago