I've created an app using ionic tabs template.
app.js
.state('tab', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html",
resolve: {
n : function () { return 10; }
}
})
tabs.html
<ion-tabs class="tabs-icon-top tabs-dark">
<ion-tab title="Cart"href="#/tab/cart" badge='n' badge-style="badge-positive">
<ion-nav-view name="tab-cart"></ion-nav-view>
</ion-tab>
</ion-tabs>
I'm trying to make n
available to the tab view and all it's child states (In this case, display it's value in the badge).
This is a simplified example, The real value will be resolved from some factory. The above example does not display the tag.
How can i do that ?