I have an ng-repeat that is outputting a number of
<p>
//NG-repeat
<div class="col-xs-4 mbm" ng-repeat="wine in wines">
<p readMore> {{wine.copy|truncate: textLength }}
<a ng-click="changeLength()" class="color3"><strong>More</strong></a>
</p>
</div>
//NG-click
$scope.changeLength = function() {
$scope.textLength = 9999;
}
ng-click
ng-repeat
ng-repeat
Target the wine
for the ng-click
:
<p readMore> {{wine.copy|truncate: wine.textLength }}
<a ng-click="changeLength(wine)" class="color3"><strong>More</strong></a>
</p>
And then only truncate the targeted text:
$scope.changeLength = function(wine) {
wine.textLength = 9999;
}