+ MainMenu component; - MainMenu directive; other
This commit is contained in:
1 parent
7a62d341bb
commit
54dc25d017
5 files changed
+22
-31
No files matched your search
@@ -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
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user