Updates regarding SPFx and Aurelia

SPFx and some npm packages has been updated so if you have used my previous post http://www.dunite.se/2017/12/25/aurelia-spfx/ on Auerlia-SPFx make sure you read this. It is important to verify your version of Node and NPM. These version dependencies are related to SPFx and not to Aurelia it-self. npm –v 5.6.0 node -v v8.11.3 When you […]

Using WebPartContext in Aurelia webpart

When using Aurelia in SPFx you can use the dependency injection feature to store the current WebPartContext. aurelia.container.registerInstance(”WebPartContext”, this.context); I my render method I store looks like below. Notice the line with registerInstance, it stores the WebPartContext with a name. public render(): void { this.domElement.innerHTML = ‘<div id=”${this.instanceId}” class=”${this.instanceId}” >Loading…</div>’; require([‘aurelia-bootstrapper’],(au) => { au.bootstrap((aurelia: Aurelia) […]