Skip to content

Commit efea67c

Browse files
benleshjamesdaily
authored andcommitted
docs($anchorScroll): fix example controller and style
Changed controller name in example html to ScrollCtrl to match name in example js. Add styling to example html so scrollable area is not obtrusive to documentation page design. Closes angular#3898
1 parent aa47319 commit efea67c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ng/anchorScroll.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @example
1717
<example>
1818
<file name="index.html">
19-
<div ng-controller="MainCtrl">
19+
<div id="scrollArea" ng-controller="ScrollCtrl">
2020
<a ng-click="gotoBottom()">Go to bottom</a>
2121
<a id="bottom"></a> You're at the bottom!
2222
</div>
@@ -34,6 +34,11 @@
3434
}
3535
</file>
3636
<file name="style.css">
37+
#scrollArea {
38+
height: 350px;
39+
overflow: auto;
40+
}
41+
3742
#bottom {
3843
display: block;
3944
margin-top: 2000px;

0 commit comments

Comments
 (0)