Last active
November 15, 2016 06:06
-
-
Save RemeJuan/9c8500cf652fccc43fc888cd06265853 to your computer and use it in GitHub Desktop.
Aurelia: First Impressions #2
This file contains 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
// 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