Skip to content

Instantly share code, notes, and snippets.

@JeroenVinke
Created April 9, 2016 11:59
Show Gist options
  • Save JeroenVinke/e086e0055b32bec8d97e5d3d1801453a to your computer and use it in GitHub Desktop.
Save JeroenVinke/e086e0055b32bec8d97e5d3d1801453a to your computer and use it in GitHub Desktop.
Aurelia - JQueryUI DatePicker
<template>
<router-view></router-view>
</template>
import {inject} from 'aurelia-framework';
import {Router, RouterConfiguration} from 'aurelia-router';
@inject(Router, RouterConfiguration)
export class App {
constructor(router, routerConfiguration) {
this.router = router;
this.routerConfiguration = routerConfiguration;
this.routerConfiguration.map({ route: ['', 'foo'], name: 'foo', moduleId: './foo' });
this.routerConfiguration.map({ route: 'bar', name: 'bar', moduleId: './bar' });
this.router.configure(this.routerConfiguration);
}
}
<template>
<h3>Bar</h3>
</template>
export class Bar {}
<template>
<h3>Foo</h3>
<div id="tabstrip" ak-tabstrip="k-animation.bind: { open: { effects: 'fadeIn' } }">
<ul>
<li class="k-state-active">
Test
</li>
</ul>
<div>
<ak-drop-down-list k-value.two-way="capSize">
<select style="width: 100%;">
<option>S - 6 3/4"</option>
<option>M - 7 1/4"</option>
<option>L - 7 1/8"</option>
<option>XL - 7 5/8"</option>
</select>
</ak-drop-down-list>
</div>
</div>
<button click.delegate="redirect()">Redirect</button>
</template>
import {inject} from 'aurelia-framework';
import {Router} from 'aurelia-router';
@inject(Router)
export class Foo {
constructor(router) {
this.router = router;
}
redirect() {
this.router.navigateToRoute('bar');
}
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css">
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script>
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script>
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.4/config2.js"></script>
<!--<script src="./config2.js"></script>-->
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
/*******************************************************************************
* The following two lines enable async/await without using babel's
* "runtime" transformer. Uncomment the lines if you intend to use async/await.
*
* More info here: https://github.com/jdanyow/aurelia-plunker/issues/2
*/
//import regeneratorRuntime from 'babel-runtime/regenerator';
//window.regeneratorRuntime = regeneratorRuntime;
/******************************************************************************/
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro());
aurelia.start().then(a => a.setRoot());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment