Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9d06681

Browse files
committed
fixup 1
1 parent 56e102d commit 9d06681

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/app/src/tutorials.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ angular.module('tutorials', [])
1111
scope: {},
1212
template:
1313
'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n' +
14-
// '<a ng-href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n' +
15-
'<a ng-href="https://github.com/angular/angular-phonecat/compare/pre-v1.5.0-snapshot~{{diffLo}}...pre-v1.5.0-snapshot~{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
14+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/old-step-{{diffLo}}...old-step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n' +
1615
'<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',
1716
link: function(scope, element, attrs) {
1817
var seq = 1 * attrs.docTutorialNav;
1918
scope.seq = seq;
2019
scope.prev = pages[seq];
2120
scope.next = pages[2 + seq];
22-
scope.diffLo = 13 - seq;
23-
scope.diffHi = 12 - seq;
21+
scope.diffLo = seq ? (seq - 1): '0~1';
22+
scope.diffHi = seq;
2423

2524
element.addClass('btn-group');
2625
element.addClass('tutorial-nav');
@@ -39,12 +38,10 @@ angular.module('tutorials', [])
3938
'<div class="alert alert-info" ng-show="show">\n' +
4039
' <p>Reset the workspace to step {{step}}.</p>' +
4140
' <p><pre>git checkout -f old-step-{{step}}</pre></p>\n' +
42-
// ' <p>Refresh your browser or check out this step online: '+
43-
// '<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
4441
' <p>Refresh your browser to see the changes.</p>\n' +
4542
'</div>\n' +
4643
'<p>The most important changes are listed below. You can see the full diff on ' +
47-
'<a ng-href="https://github.com/angular/angular-phonecat/compare/pre-v1.5.0-snapshot~{{13 - step}}...pre-v1.5.0-snapshot~{{12 - step}}" title="See diff on Github">GitHub</a>.\n' +
44+
'<a ng-href="https://github.com/angular/angular-phonecat/compare/old-step-{{step ? (step - 1) : \'0~1\'}}...old-step-{{step}}" title="See diff on Github">GitHub</a>\n' +
4845
'</p>'
4946
};
5047
});

0 commit comments

Comments
 (0)