Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.js"></script>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular-route.min.js">
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app='contatosApp'>
</body>
</html>
 
var myApp = angular.module("contatosApp", [ngRoute]);
myApp.config([ '$routeProvider', function($routeProvider) {
$routeProvider.when('/contatos', {
    templateUrl : 'listContatos.html',
    controller : 'contatosController'
}).when('/addContatos', {
    templateUrl : 'createContato.html',
    controller : 'contatosController'
}).when('/deleteContato', {
    templateUrl : 'listContatos.html',
    controller : 'contatosController'
}).otherwise({
    redirectTo : '/contatos'
});
} ]);
myApp.config([ '$httpProvider', function($httpProvider) {
  $httpProvider.defaults.useXDomain = true;
    delete $httpProvider.defaults.headers.common['X-Requested-With'];
} ]);
myApp.controller("contatosController", function contatosController($scope, contatosService) {
  alert(1);
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers