Hi Paras,

There is no safe way to do this. This is only possible when the people 
using and creating the forms are trusted. (an intranet app inside a 
corporation might adhere to that). 
With that out of the way, you can actually store JS functions into text 
fields, and use eval to activate them again. 

console.log(eval('2 + 2') === eval(new String('2 + 2')));
// expected output: false

But again, this is not a safe operation. If a user injects malicious code, 
it will get executed.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/e09c70c8-dc83-4618-ab77-7a67e04db514%40googlegroups.com.

Reply via email to