Skip to content

Commit

Permalink
fix(collectionRepeat): allow angular expressions properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Apr 29, 2014
1 parent 46291d6 commit 94bcbf7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/angular/directive/collectionRepeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* <div class="list">
* <div class="item my-item"
* collection-repeat="item in items"
* collection-item-width="100%"
* collection-item-width="'100%'"
* collection-item-height="getItemHeight(item, $index)"
* ng-style="{height: getItemHeight(item, $index)}">
* {% raw %}{{item}}{% endraw %}
Expand Down Expand Up @@ -80,8 +80,8 @@
* <ion-content>
* <div class="item item-avatar my-image-item"
* collection-repeat="image in images"
* collection-item-width="33%"
* collection-item-height="33%">
* collection-item-width="'33%'"
* collection-item-height="'33%'">
* <img ng-src="{{image.src}}">
* </div>
* </ion-content>
Expand Down Expand Up @@ -151,8 +151,8 @@ function($collectionRepeatManager, $collectionDataSource, $parse) {
} else if (!isVertical && !$attr.collectionItemWidth) {
throw new Error("collection-repeat expected attribute collection-item-width to be a an expression that returns a number.");
}
$attr.collectionItemHeight = $attr.collectionItemHeight || '100%';
$attr.collectionItemWidth = $attr.collectionItemWidth || '100%';
$attr.collectionItemHeight = $attr.collectionItemHeight || '"100%"';
$attr.collectionItemWidth = $attr.collectionItemWidth || '"100%"';

var heightParsed = $attr.collectionItemHeight ?
$parse($attr.collectionItemHeight) :
Expand Down

0 comments on commit 94bcbf7

Please sign in to comment.