Skip to content

Instantly share code, notes, and snippets.

@pjschreifels
Last active August 17, 2016 18:51
Show Gist options
  • Save pjschreifels/88c9f937c780d5564873541d4f782f7d to your computer and use it in GitHub Desktop.
Save pjschreifels/88c9f937c780d5564873541d4f782f7d to your computer and use it in GitHub Desktop.
<template>
<button type="button" class="btn btn-secondary" click.trigger="show()">Show</button>
</template>
import {autoinject} from 'aurelia-framework';
import {View} from './view';
export class Show() {
constructor(private view: View) {
}
show() {
//this.view.someBoolean = true;
this.view.displayThis(true);
}
}
<template>
<div class="card card-sm" show.bind="someBoolean">
<div class="card-block">
<p class="mb5">Display some stuff.</p>
</div>
</div>
</template>
export class View {
someBoolean: boolean = false;
constructor(){
}
displayThis(result) {
this.someBoolean = (result) ? true : false;
console.log(this.someBoolean);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment