Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Last active July 5, 2017 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vaccano/f97fb1c1bca0357472b629968a1fa124 to your computer and use it in GitHub Desktop.
Save Vaccano/f97fb1c1bca0357472b629968a1fa124 to your computer and use it in GitHub Desktop.
Disabled Options
<template>
<h1>${message}</h1>
<select>
<option repeat.for="option of options" model.bind="option">${option.value}</option>
</select>
</template>
import {Option} from './option';
export class App {
constructor() {
this.options = [new Option {isDisabled = false, value='Test1',
new Option {isDisabled = false, value='Test2',
new Option {isDisabled = false, value='Test3']
}
message = 'Hello World';
options = [];
}
import {inject} from 'aurelia-dependency-injection'
export class Action1Dependency {}
export class Action2Dependency {}
export class ActionBase{
}
@inject(Action1Dependency)
export class Action1 extends ActionBase{
constructor(dep){
super();
this.dep = dep;
}
}
@inject(Action2Dependency)
export class Action2 extends ActionBase{
constructor(dep){
super();
this.dep = dep;
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app>
<h1>Loading...</h1>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/jspm_packages/system.js"></script>
<script src="https://cdn.rawgit.com/jdanyow/aurelia-bundle/v1.0.3/config.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export class Option {
isDisabled: false;
value: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment