Skip to content

Instantly share code, notes, and snippets.

@JeroenVinke
Last active February 20, 2017 17:00
Show Gist options
  • Save JeroenVinke/f1584690cf69bbcae386a47c836898c8 to your computer and use it in GitHub Desktop.
Save JeroenVinke/f1584690cf69bbcae386a47c836898c8 to your computer and use it in GitHub Desktop.
Aurelia KendoUI component - problem report
<template>
<require from="aurelia-kendoui-bridge/button/button"></require>
<ul ak-menu="k-open-on-click.bind:true; k-data-source.bind: dataSource" ak-menu.ref="menuVM" class="rgk-action-menu">
</ul>
<button click.delegate="change()">Change</button>
</template>
import {inject} from "aurelia-framework";
import {TaskQueue} from "aurelia-task-queue";
@inject(TaskQueue)
export class App {
constructor(taskQueue) {
this.taskQueue = taskQueue;
this.dataSource = [
{
text: '<i class="fa fa-bars" aria-hidden="true"></i>',
encoded: false,
items: [ {text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test', encoded: false, },
{text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test1', encoded: false, },
{text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test2', encoded: false, },
{text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test3', encoded: false, }]
}
]
}
change() {
this.dataSource = [
{
text: '<i class="fa fa-bars" aria-hidden="true"></i>updated1',
encoded: false,
items: [ {text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test', encoded: false }]
},
{
text: '<i class="fa fa-bars" aria-hidden="true"></i>updated2',
encoded: false,
items: [ {text:'<i class="fa fa-envelope-o" aria-hidden="true"></i>&nbsp; test', encoded: false }]
}
];
this.taskQueue.queueTask(() => {
this.menuVM.recreate();
});
}
}
<!doctype html>
<html>
<head>
<title>Aurelia KendoUI bridge</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.1.118/styles/kendo.common.core.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.1.118/styles/kendo.bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.2.1/chroma.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.1.118/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.1.118/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2017.1.118/js/kendo.all.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/1.2.0/config2.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro());
aurelia.start().then(a => a.setRoot());
}

Add any additional information here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment