My model is set to a select
<!-- html -->
<md-select ng-model-options="{trackBy: '$value.id'}" placeholder="Select"
ng-model="vm.selected">
<md-option ng-value="case" ng-repeat="item in items" ng-selected="$first">{{item.subject}} - {{item.desc}}</md-option>
</md-select>
<p read-more ng-model="vm.selected.desc" length="50"></p>
Value changes accordingly but since showLinks is set upon controller initialization if first selected valued doesn't compute that requires showLinks then they are never added.
<!-- read-more/js/directives/readmore.js -->
if (!$scope.countingWords && $scope.text.length > $attrs.length) {
$scope.showLinks = true;
} else if ($scope.countingWords && $scope.text.split(" ").length > $attrs.length) {
$scope.showLinks = true;
} else {
$scope.showLinks = false;
}
By the same token if the first selected value would require to show links when selecting to one that doesn't it would still show the link. It requires to watch the change on the model too.
My model is set to a select
Value changes accordingly but since showLinks is set upon controller initialization if first selected valued doesn't compute that requires showLinks then they are never added.
By the same token if the first selected value would require to show links when selecting to one that doesn't it would still show the link. It requires to watch the change on the model too.