[AngularJS] Re: ngStyle can't add inline style as intended

2014-01-05 Thread Sander Elias
Hi Allen, Have a look at this plunk, it works as it should. you have used ng-style="{{organCover}}" this means that your expression is translated into the string {'background-image': \"url('http://localhost/dooleystand/ci/public/images/orga

[AngularJS] Re: ngStyle can't add inline style as intended

2014-01-06 Thread Allen Nie
Well, this is what I get if I use ng-style="organCover": It didn't translate organCover into the line of code that I hoped for, nor did it add the background-image to element.style{} css. It's always kind of painful when situation happens like this and you have no clue. On Monday, January 6,

[AngularJS] Re: ngStyle can't add inline style as intended

2014-01-06 Thread Daniel Tabuenca
You can see on Sander's plunker that what he is telling you works, so you must be doing something else wrong. It would be good if you could post your own plunker showing the problem, so we can help you figure out what is actually happening. On Monday, January 6, 2014 1:43:35 PM UTC-7, Allen Ni

[AngularJS] Re: ngStyle can't add inline style as intended

2014-01-07 Thread Pan Stav
As Daniel mentioned a plunkr would be very helpful. I'd add that firs thing I'd check is whether organCover is declared on the same scope that the header tag is at AND if it is declated as such: > $scope.organCover = { > 'background-image': "url(' > http://localhost/dooleystand/ci/public/images/