0.3.6 • Published 7 years ago

jtp-alert v0.3.6

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

JtpAlert

This project was generated with Angular CLI version 1.7.3.

Codacy Badge

Install

To install this, use:

npm install --save jtp-alert

Use

To use in your project import it in your module like that:

import { BrowserModule } from  '@angular/platform-browser';

import { NgModule } from  '@angular/core';

  

import { AlertModule } from  'jtp-alert';

      

import { AppComponent } from  './app.component';

  
  

@NgModule({

declarations: [

AppComponent
   
],

imports: [

BrowserModule,

AlertModule

],

providers: [],    

bootstrap: [AppComponent]

})

export  class  AppModule { }

and use in your component:

<div style="text-align:center" (click)="show(alert)"></div>
<jtp-alert #alert [data]="data"></jtp-alert>

and

export class AppComponent {
  data = {
    title: 'Test title',
    message: 'Message for user',
    type: 'success',
    btns: [
      {
        name: 'OK',
        function: () => {
          console.log('Ok button works');
        },
        order: 1,
        close: true,
        main: true
      },
      {
        name: 'Cancel',
        close: false
      }
    ]
  };

  show(alert){
    alert.show();
  }

}

And done!

Example

You can see the example of the usage in the example project.

Special thanks

Thanks for hendrathings that helped me on StackOverFlow and solve the problem ionicons's fonts not loading.

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.1

7 years ago

0.0.9

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago