You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 10, 2018. It is now read-only.
Copy file name to clipboardexpand all lines: index.html
+47-5
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,7 @@ <h3>Custom templates without ng-repeat and auto-slide</h3>
109
109
<div>
110
110
<h3>Lockable carousel</h3>
111
111
<divclass="details">
112
+
use rn-carousel-locked binding to dynamically lock/unlock the carousel
112
113
</div>
113
114
<divclass="carousel-demo">
114
115
<label><inputtype="checkbox" ng-model="isLocked"/>Lock the carousel</label>
@@ -121,9 +122,32 @@ <h3>Lockable carousel</h3>
121
122
</ul>
122
123
</div>
123
124
</div>
125
+
<br>
126
+
<div>
127
+
<h3>Add/Remove items in the collection</h3>
128
+
<divclass="details">
129
+
The carousel is bound to your ngRepeat collection.<br>
130
+
If you add items at the start of the collection, then by default, the slide position will change.<br>
131
+
If you want to preserve position even when adding items at the head of the collection, you need to add the `rn-carousel-deep-watch` attribute. This has a performance impact so use carefully.<br>
132
+
Works great with buffering too so you can have almost infinite slides while keeping only 5 items in the DOM<br>
133
+
</div>
134
+
<divclass="carousel-demo" >
135
+
<buttonng-click="addSlide('head')">Add at beginning</button>
136
+
<buttonng-click="addSlide('tail')">Add at end</button>
0 commit comments