Hey @gbox , thanks for the tip it is very good for a static picture. What if I want to use a picture URL that is found in the scope level. Say a user logs in with facebook and I want his photo to be the icon of the tab such as: $scope.user.picture. Any idea?
Also wondering how to use dynamic value (i.e. from $scope) to change the icon’s background-image. I think this is likely a .directive but anyone with suggested code would be much appreciated.
so it appears you can actually have more than one CSS class in icon-on/icon-off
it also appears that height: 100% is overriden by ionic’s .tab-item .icon
How to customize icon of tag i, example i want customize i con of <div class="item item-icon-left layout1" ng-click="gotoS('tab.promotion')" ng-if="$root.tabConfig.tabPromotion"> <i class="icon homeIcon"></i> {{$root.themeConfig.titleOfPromotion}} </div>
Hi. thanks for the post. i have used it and its working fine. But in some cases the icons are appearing multiple times. The icon is displayed below the same icon in tab bar. can u help me to sort out the issue.?
Hi guys I was unable to get this to work as specified above with the current ionic (ionic@3.6.0 ) I was however able to apply some of the logic and high-jack an existing icon with the below css inserted into app.scss
.ion-md-flame {
background-repeat: no-repeat;
background-position:center;
background-image: url('../assets/icon/wd_sun_icon.png');
height: 100%;
background-size:contain;
color: rgba(60, 60, 60, 0)!important;//We are using this to defeat the flame icon and just show wd_sun_icon.png
}
Ionic is a powerful and powerful framework that facilitates the creation of mobile and scalable web applications with web technologies. It comes with many features and tools that can make development easy and convenient. One of the features that I like about this is Ionicons, a set of completely open code icons with more than 700 icons designed for web, iOS, Android and desktop applications.
This is great and most of the time you can find the right icon in your application, especially because this icon set was created specifically for this framework and includes icons for the Material Design and iOS versions. But the designers are always inspired and they give you icons that you can not find in the standard package. So it was the same for me during the development. I looked for a solution in the ionic forum and my proposal was to create new sources, new icon packages and other solutions that consume a lot of time. In this article, I present a simple and easy way to create custom icons for your application that can be used for buttons, tabs or other components without altering the format and other guidelines.