Hi somashaker,
Can you be a bit more specific about "not working as expected" ?
What is happening?
Do you see an error message?
Is it doing something you don't want it to do?
Is it not doing something you think it should?
This is primarily a
Java forum, rather than Angular/Javascript, so you might have more luck in a different forum.
But in any case, your question needs clarification first.