Can an injected dependency on a controller be accessed outside of it?
function clientCreateController(ClientsService, retrieveAddress) {
var vm = this;
vm.searchCep = searchCep;
}
function searchCep(cep) {
retrieveAddress.find(cep)
.success(function(data) {
parseAddress(data).bind(this);
})
.error(function(err) {
// showAlertDanger(vm, 'Invalid CEP.');
console.log(err);
});
}
I am calling the method from a click event on a button.
Thank you!