WPT Login Script for Angular Applications

Hi,
I am trying to create a script for an angular JS application which has username and pwd field.
while i set the username & pwd using set value or exec document.getElementById() , and click on submit button, the application still doesnt recognize that the username and pwd field is set.
I also tried using sendkey but i am not sure how to pass a string using send keys.
any Help is much appreciated.

Thanks