I\'m not getting Aurelia (CLI) & TypeScript & MomentJS to work together. I\'ve seen solutions for Aurelia & Moment problems but they don\'t use the Aurelia CLI.
Update
This doesn't actually work. Not the thing compiles but I'm getting "TypeError: Cannot read property 'format' of undefined" when running the app.
Original
Ah, stupid me. I just had to inject Moment into the class. Obviously.
So here's the working version:
import { Moment } from 'moment';
import { autoinject } from "aurelia-framework";
export class App {
message = 'Hello World!';
moment: Moment;
constructor(moment : Moment){
this.moment = moment;
}
hello() : string {
return this.moment.format();
}
}