[Angular] -Removed internal js to follow best practice.
[Angular] -Adding separate code for controller & services.