# Problem icon URL in tabs- I want do that in Angular way

**URL:** <https://forum.ionicframework.com/t/problem-icon-url-in-tabs-i-want-do-that-in-angular-way/13734>\
**Category:** ionic-v1\
**Created:** [December 7, 2014, 3:43pm UTC](https://forum.ionicframework.com/t/problem-icon-url-in-tabs-i-want-do-that-in-angular-way/13734 "2014-12-07T15:43:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry123](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@larry123](https://forum.ionicframework.com/u/larry123)\
**Post date:** [December 7, 2014, 3:43pm UTC](https://forum.ionicframework.com/t/problem-icon-url-in-tabs-i-want-do-that-in-angular-way/13734/1 "2014-12-07T15:43:20Z")

</div>

Hello, I want to do that something like this: [http://pastebin.com/UHE9MvU8](http://pastebin.com/UHE9MvU8) and this way this doesn’t work.  
Where tab icon backround is link from controller. It work, when url is in css, but in my case I get the URL from API and this URL cannot be hardcoded in css!  
How to set tab icon- i want get url from angular controller.  
Please, I really need help, and I’m out of ideas.

---

<div class="post-metadata">

**Author:** ![larry123](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@larry123](https://forum.ionicframework.com/u/larry123)\
**Post date:** [December 7, 2014, 4:04pm UTC](https://forum.ionicframework.com/t/problem-icon-url-in-tabs-i-want-do-that-in-angular-way/13734/2 "2014-12-07T16:04:59Z")

</div>

Just use some workaround- here is it: [Dynamic image icon in "ion-tab"](http://forum.ionicframework.com/t/dynamic-image-icon-in-ion-tab/6003)

---

<div class="post-metadata">

**Author:** ![myc0210](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@myc0210](https://forum.ionicframework.com/u/myc0210)\
**Post date:** [December 18, 2014, 4:58am UTC](https://forum.ionicframework.com/t/problem-icon-url-in-tabs-i-want-do-that-in-angular-way/13734/3 "2014-12-18T04:58:13Z")

</div>

.directive(‘ycBackColor’, function() {  
return function(scope, element, attrs){  
attrs.$observe(‘ycBackColor’, function(value) {  
element[0].childNodes[0].style[‘background-color’] = value;  
});  
};  
});

usage:

Dude this is my way to solve it. i make a directive to dynamically change background color of ion-tabs bar. Maybe you can use this way to dynamically import url.
