1) You need some url in your backend that accepts a zip code and returns u json.
I mean, you will open in your browser: localhost:8000/api/consultacep/91370000
and you’ll see:
{'Localidade': u'Porto Alegre', 'Bairro': u'Vila Ipiranga', 'UF': u'RS', 'Logradouro': u'Rua Alberto Silva - at\xe9 965/966', 'CEP': u'91370-000'}
2) Somewhere in your controller you will make a call to this api and save the result in $Scope:
$http.get('/api/consultacep/91370000').success(function(local){
$scope.local_encontrado = local;
});
3) In your template you need to show the attributes of $Scope.local_found. Do this using ng-model:
Localidade: <input type="text" ng-model="local_encontrado.Localidade"><br>
Bairro: <input type="text" ng-model="local_encontrado.Bairro"><br>
UF: <input type="text" ng-model="local_encontrado.UF"><br>
<!-- etc -->
Hello @Regis. How’s the code you made? There are several ways to do this, and to help you, you need a Minimum Example
– Caputo
@Regis posts his code.
– RafaelTheodoro