Skip to content

Instantly share code, notes, and snippets.

@telekosmos
Created March 13, 2015 11:25
Show Gist options
  • Save telekosmos/6bcd27dd902096499fd3 to your computer and use it in GitHub Desktop.
Save telekosmos/6bcd27dd902096499fd3 to your computer and use it in GitHub Desktop.
ES6 module syntax
// Both export declaration seems to have the same semantics as for babeljs.io
// export class Welcome {
class Welcome {
constructor(){
this.heading = 'Welcome to the Aurelia Navigation App!';
this.firstName = 'John';
this.lastName = 'Doe';
}
get fullName(){
return `${this.firstName} ${this.lastName}`;
}
welcome(){
alert(`Welcome, ${this.fullName}!`);
}
}
export default Welcome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment