Sunday, 29 May 2016

20. Anjularjs : Custom Service register


 How to write a custom service in anjularjs  the register with controller ?

 Example : i need a space between the inputstring whenever find a capital latter need to append a space.


Design table body :

 now write custom function to handle this requirement


now our requirement is done. but no custom service. if we observice our service which is very complex and not be good readable also. so that using anjularjs factory method define this logic as a service and utilize it.



using factory method define "custom service"--stringservice.





No comments:

Post a Comment