Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="app">
  <div ng-controller="firstCtrl">
  <div ng-repeat="chapter in chapters">
            <div ng-repeat="page in chapter.pages">
                <p>Page: {{$parent.$index}}  chapter:{{$index}} Title: {{page.title}}</p>
            </d
          </div>
</body>
</html>
 
var app = angular.module('app', []);
app.controller('firstCtrl', function($scope){
 $scope.chapters= [
    {
        pages: [
            {title: 'Title3'},
            {title: 'Title4'},
            {title: 'Title5'}
        ]
    },
    {
        pages: [
            {title: 'Title1'},
            {title: 'Title2'}
        ]
    }
];
  
});
Output

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

Dismiss x
public
Bin info
zieemerpro
0viewers