Answer the question
In order to leave comments, you need to log in
How to apply styles to angular objects?
app.directive("changeColors", function () {
return function (scope, element, attributes) {
// element -jqlite object
var elements = element.find("td"); //get all child elements
console.log( elements);
for(var i = 0; i < elements.length; i++) {
// if element contains red text, make it red
if (elements.eq(i).text() == "Online") {
elements .eq(i).css("color", "green")
}
}
}
})
This is js . and this is html
{{service.name}}
{{service.status}}
How do I apply a background color to the one generated by angular.
In a regular table, the jqlita code works.
Online - maybe because of this class.
Help plzz
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question