0

Is it possible to make an icon (cart) with badge that has number of items in cart? I saw that Ionic has support for tab badges, but when I try it like this:

<a class="button button-icon icon ion-android-cart" ng-href="#/cart">
     <span class="badge badge-assertive">{{$variable}}</span>
</a>

It shows me the badge...but it is below the icon (which is really not looking good since the icon is in the navigation bar). I tried adding the has-badge class but nothing happened.

I tried changing css property of it, and while padding and left/right position work, I can't move it up or down....so:

.badge {
    top: 10px
}

does nothing...

Here is how it looks...i want it positioned in the navbar, not below it:

enter image description here

Norgul
  • 4,613
  • 13
  • 61
  • 144
  • Can you create a codepen or jsfiddle for this, i think you need something like this http://codepen.io/gnomeontherun/pen/HaJwI but i am not sure what version you are using – Rahul May 12 '16 at 17:27
  • I've edited it. Version of what? Ionic? 1.7.14 – Norgul May 15 '16 at 16:49

0 Answers0