0.2.5 • Published 3 years ago

cordova-plugin-rebase-notification v0.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Para utilizá-lo você precisa de um projeto Ionic e utilizar o comando descrito na seção abaixo.

Instalação

ionic cordova plugin add cordova-plugin-rebase-notification
npm install @rebase-team/notification

Exemplos de uso

> APPMODULE.TS

import { AppComponent } from "./app.component";
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { IonicModule } from "@ionic/angular";
import { NotificationService } from "@rebase-team/notification";

@NgModule({
  declarations: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot()
  ],
  providers: [
    NotificationService
  ],
  bootstrap: [AppComponent],
  exports: []
})
export class AppModule { }

> HOME.PAGE.TS

import { NotificationService } from "@rebase-team/notification";

@Component({
  selector: "app-home",
  templateUrl: "home.page.html",
  styleUrls: ["home.page.scss"],
})
export class HomePage implements OnInit {

  constructor(
    private notification: NotificationService
  ) {
    //Cria uma notificação instantaneamente.
    this.notification.show(123, "channelId", "Title", "Text body", "icon/favicon.png");
  }

}

Metadados

Muryllo Pimenta de Oliveira – muryllo.pimenta@upe.br

Distribuído sobre a licença MIT. Veja LICENSE para mais informações.

Contribuição

  1. Fork it (https://github.com/MurylloEx/cordova-plugin-rebase-notification/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request