Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0-rc.1/angular.js" type="application/javascript"></script>
<script src="https://rawgit.com/angular/router/v0.5.3/dist/router.es5.js" type="application/javascript"></script>
  
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="cdPeople" ng-controller="AppController as app">
  <div ng-viewport>
    Your application has not started or has errors.
  </div>
</body>
</html>
 
function AppController($router) {}
AppController.$routeConfig = [
  { path: '/', component: 'people' }
];
angular
  .module('cdPeople', [
    'ngNewRouter',
    'cdPeople.people'
  ])
  .controller('AppController', AppController);
function PeopleController ($scope) {
  $scope.$watch('people.list', function(){console.log(arguments);});
  this.list = ['Ada Lovelace', 'Marie Curie', 'Carl Gauss', 'Nikola Tesla'];
}
angular
  .module('cdPeople.people', [])
  .controller('PeopleController', ['$scope', PeopleController]);
Output

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

Dismiss x
public
Bin info
zvictorpro
0viewers