I am new to angularjs. I am working on angularjs controller. Inside a controller I have the below function
$scope.violation = function(argArray){
var message = '';
var violationLog = argArray;
if(violationLog!= null && violationLog!='undefined')
{
var violationArray = new Array();
violationArray = violationLog.split("<br/>");
for (var i = 1; i < violationArray.length; i=i+2)
{
message += violationArray[i];
}
}
return message;
}
I am passing "argArray" variable to that function as
argArray = "4<br/>Time in this state exceeded 2 minutes.<br/>3<br/>Time in this state exceeded 1 minutes.";
Here, I want to arrange those two messages in 'tr' tags inside a table.
Like,
Help me.