I need to remove Title
attribute of templateResult
function of
I can console.log
the object with below code.
function resultfucntion(state) {
console.log(state);
//state.removeAttribute("title");
if (!state.id) { return state.text;}
var $state = $(
'<span>' state.text '(' state.text1 ')</span>'
);
return $state;
};
I am getting output of the object like below.
Object { id: "1", text: "admin", text1: 0, title: "<table> <tr> <td>Organisation</td> <td>null</td> </tr> <tr> <td>Age</td> <td></td> </tr> </table>" }
CodePudding user response:
use this command
delete state.title
state will be
{id: '1', text: 'admin', text1: 0}