Skip to content

Instantly share code, notes, and snippets.

View TurBas's full-sized avatar

Michel van der Weide TurBas

View GitHub Profile
@TurBas
TurBas / disabledIfNotValid.ts
Created May 11, 2017 18:49
Aurelia disable button on validation errors
import {customAttribute, inject} from 'aurelia-framework'
import {ValidationController} from 'aurelia-validation'
import * as jQuery from "jquery";
@inject(Element)
@customAttribute('disabled-if-not-valid')
export class DisabledIfNotValid {
private element: JQuery;
private controller: ValidationController;