fill out municipality combobox according to the selected state in Angular

Asked

Viewed 84 times

0

Good morning,

I own a combobox of municipality that is loaded with municipalities according to the selected state, I am bringing the data of an API made in C# as follows:

$http.post('views/sistema/sistemas/service.aspx/Municipio', {
    estado: form.estado || ''
    }).then(function (success) {
        let data = JSON.parse(success.data.d);
        $scope.data = data;
        $scope.isLoading = false;
        $scope.municipioDestino.aaData = data.map(it => {
            return {
                municipio: it.Municipio
            };
        });
    }, function (error) {
        $scope.isLoading = false;
});

but the error is returned:

angular.js:13236 Error: [ng:areq] Argument 'Sistemacontroller' is not a Function, got Undefined

What’s wrong?

  • wrong post, already removed...

  • 1

    Well, apparently there’s code missing there, but by mistake the problem is in this Systematizer, maybe the syntax is wrong, because it is stating that it is not a function and is as undefined.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.