I have the following JavaScript code:
vm.MostrarDiv = function() {
$http({
method: 'POST',
url: _obterUrlAPI() + "ImportacaoPreFatura/ValidarLayoutTeste",
dataType: "jsonp",
params: {
listaTeste: vm.carregarLayoutTeste
}
}).then(function successCallback(response) {
vm.preFatura = response.data;
}, function errorCallback(response) {
MessageBox("Erro", response.data.Message);
});
};
The param, vm.carregarLayoutTeste has values, but when it reach the controller.
[HttpPost]
[Route("ValidarLayoutTeste")]
public IHttpActionResult ValidarLayoutTeste(List<ValidaLayout> listaTeste) {
The listaTeste comes as null
, does somebody knows why this is happening?