Skip to content

Instantly share code, notes, and snippets.

@RemeJuan
Last active November 15, 2016 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RemeJuan/9c8500cf652fccc43fc888cd06265853 to your computer and use it in GitHub Desktop.
Save RemeJuan/9c8500cf652fccc43fc888cd06265853 to your computer and use it in GitHub Desktop.
Aurelia: First Impressions #2
// Binding data
import { bindable } from 'aurelia-framework';
import { moment } from 'moment';
export class OtherComponent{
//Binding data reference
@bindable data;
//Change handler (not required).
dataChanged(data) {
this.data = {
...data,
date: moment(data.date).format('YY MM DD'),
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment