Angular: Empty Fiddle
http://angularjs.org/
by Prashanth bhat
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
Hello, {{person.name}}!
<input type="text" ng-model="person.name"/>
<input type="text" ng-model="person.no"/>
<input type="text" ng-init="person.add=[]" ng-model="person.add[0]"/>
<input type="text" ng-model="person.add[1]"/>
<input type="text" ng-model="person.add[2]"/>
<button ng-click="display();">display<button/>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.display = function (){
alert($scope.person.name);
alert($scope.person.no);
alert($scope.person.add[0]);
alert($scope.person.add[1]);
alert($scope.person.add[2]);
}
var a.b.c.d = {};
console.log(a);
}