Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Aurelia messaging app
import {inject} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
@inject(EventAggregator)
export class Messenger{
constructor(eventAggregator){
this.ea = eventAggregator;
this.message = "";
}
sendMessage(){
this.ea.publish('new-message', this.message);
this.message = "";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment