ViaCEP AngularJS directive and service
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
dist
src
.gitignore
.nvmrc
.travis.yml
LICENSE
README.md
bower.json
gulpfile.js
karma.conf.coffee
package.json

README.md

angular-viacep  Build Status

ViaCEP AngularJS directive and service

See demo here

How to install:

Install from bower

bower install angular-viacep --save

Include this line in your index.html

<script src="bower_components/angular-viacep/dist/angular-viacep.min.js"></script>

How to use directive(recommended)

Just see demo

Or, if you prefer, use only service

angular.module('app', ['angular.viacep'])
angular.module('app').controller('ctrl', function ctrl($scope, viaCep) {
    viaCep.get('08465-312').then(function(response){
        $scope.address = response
    });
});