+ MainMenu component; - MainMenu directive; other

This commit is contained in:
tmshv committed 2016-02-22 02:08:01 +03:00
1 parent 7a62d341bb
commit 54dc25d017
5 files changed
+22 -31

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import template from '../../templates/components/main-menu.html';
export default function (app) {
app.component('mainMenu', {
bindings: {
menu: '=items'
},
controller: function(menu){
this.isActive = item => menu.current ? item.url == menu.current.url : false;
this.isValid = item => 'url' in item;
},
template: template
});
};