Angular: Empty Fiddle

http://angularjs.org/

by alexrada

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<body ng-app="myApp">
<div ng-controller="MyCtrl">
   c:{{c | json}} <br />d:{{d | json}} 
</div>
</body>

JavaScript

var myApp = angular.module('myApp',[]);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

var def = { value: 'example'}

function MyCtrl($scope) {
    $scope.name = 'Superhero';
    var c = Object.create(def);
    c.anothervalue = 12345;
    $scope.c = c;
    console.log ($scope.c);
    
    var d = Object.create(def);
    d.anothervalue = 765432;
    $scope.d = d;
    console.log ($scope.d);
}