-
-
Save gregoryagu/6272442582bb2abe4939a0fd514519fb to your computer and use it in GitHub Desktop.
Menu: basic usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./basic-use.css!css"></require> | |
<require from="aurelia-kendoui-bridge/menu/menu"></require> | |
<div id="megaStore"> | |
<ul ak-menu k-data-source.bind="menuData"> | |
</ul> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class App { | |
menuData= [ | |
{ | |
text: "Item 1", | |
value: "Item 1 Value", | |
items: [ | |
{ | |
text: "Sub Item 1", | |
value: "Sub Item 1 Value", | |
items: [ | |
{ | |
text: "Sub Sub Item 1", | |
value: "Sub Sub Item 1 Value" | |
}, | |
{ | |
text: "Sub Sub Item 2", | |
value: "Sub Sub Item 2 Value" | |
} | |
] | |
}, | |
{ | |
text: "Sub Item 2", | |
value: "Sub Item 2 Value" | |
} | |
] | |
}, | |
{ | |
text: "Item 2", | |
value: "Item 2 Value" | |
}, | |
{ | |
text: "Item 3", | |
value: "Item 3 Value" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#megaStore { | |
max-width: 600px; | |
margin: 30px auto; | |
padding-top: 120px; | |
background: url('http://demos.telerik.com/kendo-ui/content/web/menu/header.jpg') no-repeat center 0; | |
} | |
#menu h2 { | |
font-size: 1em; | |
text-transform: uppercase; | |
padding: 5px 10px; | |
} | |
#template img { | |
margin: 5px 20px 0 0; | |
float: left; | |
} | |
#template { | |
width: 380px; | |
} | |
#template ol { | |
float: left; | |
margin: 0 0 0 30px; | |
padding: 10px 10px 0 10px; | |
} | |
#template:after { | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; | |
visibility: hidden; | |
} | |
#template .k-button { | |
float: left; | |
clear: left; | |
margin: 5px 0 5px 12px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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/2016.2.714/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.2.714/styles/kendo.mobile.all.min.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/2016.2.714/js/jquery.min.js"></script> | |
<script src="https://kendo.cdn.telerik.com/2016.2.714/js/jszip.min.js"></script> | |
<script src="https://kendo.cdn.telerik.com/2016.2.714/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.0.0-beta.1.0.6/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge'); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment