added tab component

This commit is contained in:
Nick Wientge 2014-12-25 20:40:43 -05:00
parent de35cdf056
commit 033dc99e2a
4 changed files with 29 additions and 5 deletions

View file

@ -51,15 +51,15 @@ A [Product Hunt](http://producthunt.com) clone built in Meteor Ionic.
* [ ] ion-delete-button
* [ ] ion-reorder-button
* [ ] ion-option-button
* [ ] collection-repeat
* [x] collection-repeat (not needed with Blaze/Spacebars)
* [x] Loading
* [x] Modal
* [ ] Navigation (requires [iron:router](https://github.com/EventedMind/iron-router) integration)
* [x] ion-nav-view
* [x] ion-view
* [ ] ion-nav-bar
* [x] ion-nav-bar
* [ ] ion-nav-buttons
* [ ] ion-nav-back-button
* [x] ion-nav-back-button
* [ ] nav-clear
* [ ] Platform
* [x] Popover
@ -75,6 +75,6 @@ A [Product Hunt](http://producthunt.com) clone built in Meteor Ionic.
* [x] menu-toggle
* [x] menu-close
* [ ] Slide Box
* [ ] Tabs (requires [iron:router](https://github.com/EventedMind/iron-router) integration)
* [x] Tabs (requires [iron:router](https://github.com/EventedMind/iron-router) integration)
* [x] ion-tabs
* [ ] ion-tab
* [x] ion-tab

View file

@ -0,0 +1,10 @@
<template name="ionTab">
<a class="tab-item tab-item-positive {{isActiveRoute regex=path}}" href="{{url}}">
{{#if isActiveRoute regex=path }}
{{> ionIcon icon=iconOn}}
{{else}}
{{> ionIcon icon=iconOff}}
{{/if}}
{{title}}
</a>
</template>

View file

@ -0,0 +1,11 @@
Template.ionTab.helpers({
url: function () {
if (this.href) {
return this.href;
}
if (this.path) {
return Router.routes[this.path].path(Template.parentData(1));
}
}
});

View file

@ -87,6 +87,9 @@ Package.onUse(function(api) {
"components/ionTabs/ionTabs.html",
"components/ionTabs/ionTabs.js",
"components/ionTab/ionTab.html",
"components/ionTab/ionTab.js",
"components/ionView/ionView.html",
"components/ionView/ionView.js"
], "client");