Skip to content

Instantly share code, notes, and snippets.

View Thanood's full-sized avatar

Daniel Bendel Thanood

  • Cologne, Germany
View GitHub Profile
@Thanood
Thanood / ag-grid.js
Last active April 7, 2016 13:03
Aurelia - ag-grid
import { bindable, inlineView, inject } from 'aurelia-framework';
// import * as ag from 'ag-grid';
@inject(Element)
@inlineView(`
<template class="ag-blue" style="align-self: stretch; flex-grow: 1; -ms-flex: 0 1 auto; flex: 1 1 100%;">
</template>
`)
export class AgGrid {
@bindable columns;
@Thanood
Thanood / app.html
Created March 8, 2016 16:45
Aurelia - Select
<template>
<select value.bind="selectedUser">
<option repeat.for="user of users" value.bind="user.id">${user.firstName} ${user.lastName}</option>
</select>
Selected User: ${selectedUser}
</template>
Unhandled rejection Error: XHR error (404 Not Found) loading http://localhost:3000/src/aurelia-materialize-bridge/colors/md-colors.html.js
Error loading http://localhost:3000/src/aurelia-materialize-bridge/colors/md-colors.html.js
at o (http://localhost:3000/jspm_packages/system.js:4:12694)
at XMLHttpRequest.s.onreadystatechange (http://localhost:3000/jspm_packages/system.js:4:13219)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:4:18437)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:4:29421)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:5:1941)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:5:5847)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:5:13533)
at l.<anonymous> (http://localhost:3000/jspm_packages/system.js:5:15569)
@Thanood
Thanood / app.html
Last active April 1, 2016 09:25
Aurelia - attribute im element
<template>
<require from="./my-element"></require>
<require from="./my-attribute"></require>
<my-element my-attribute foo.bind="initial"></my-element>
<!--<paging num="6"></paging>-->
</template>
@Thanood
Thanood / app.html
Created April 1, 2016 09:54
Aurelia - select
<template>
<select class="form-control" value.bind="selectedValue">
<option>Select value</option>
<option repeat.for="value of values" model.bind="value">${value.Name} </option>
</select>
</template>
<template>
<select value.bind="selectedFeature">
<option value=''>All Features</option>
<option repeat.for="feature of features" model.bind="feature">${feature.Name}</option>
</select>
Selected: ${selectedFeature.Name}, ID=${selectedFeature.id}
</template>
@Thanood
Thanood / app.html
Created April 7, 2016 13:19
Aurelia - repeat over number
<template>
<label repeat.for="employee of employees">
<input type="checkbox" model.bind="employee" checked.bind="$parent.favoriteEmployees" />
${employee.fullName}
</label>
<div>
<ul>
<li repeat.for="emp of favoriteEmployees">${emp.fullName}</li>
</ul>
</div>
@Thanood
Thanood / app.html
Last active April 7, 2016 19:15
Aurelia - attr value
<template>
<require from="./my-attribute"></require>
<div my-attribute="hello"></div>
</template>
@Thanood
Thanood / app.html
Last active July 10, 2019 13:52
Aurelia-Materialize bridge base
<template>
<div>
<md-pagination md-pages="6" md-active-page.bind="activePage"></md-pagination>
</div>
<div>
active page: ${activePage}
</div>
<button md-button md-waves="color: light;" click.delegate="setToFive()">set to 5</button>
</template>
@Thanood
Thanood / app.html
Last active April 11, 2016 18:30
Aurelia - Materialize Dropdown
<template>
<router-view></router-view>
</template>