Last active
January 24, 2018 20:30
-
-
Save b-tiwari/6b6150bffb20a51b3f940ab1b7a1dfb3 to your computer and use it in GitHub Desktop.
Ionic Events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { Events } from 'ionic-angular'; | |
| import { AppEventsEnum } from '../Enums/AppEvents'; | |
| @Component({ | |
| selector: 'publisher', | |
| templateUrl: 'publisher.html' | |
| }) | |
| export class Publisher { | |
| constructor(private event: Events) {} | |
| publishArticle = () => { | |
| let dataToPublish = { title: 'Small Coffee', author: 'John Doe'}; | |
| this.event.publish(AppEventsEnum.PublishArticle , dataToPublish); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment