i have an angular service. this is the code :
angular.module('myServiceModule', [])
.service('angService',function({
this.get=function(){
console.log('i am accessible');
}
});
i have to access get() method of angular service in javascript code(not from angular code).
<script>
function caller(){
//here i have to access service get() method.how is it possible.
//can i do this->
myServiceModule.get();
}
caller();//this function i am calling after service load.
</script>
i have done this. but it is not right. How is it possible ?