angularjs ng--show is not working as expected -
i getting wrong behaviour ng-show directives.
<span class="spanlabel" ng-show="!minimumcharactersmet()" >you need @ to the lowest degree {{ howmanymorecharactersneeded() }} characters more</span> <span class="spanlabel" ng-show="isnumberofcharacterswithinrange()" >remaining characters: {{ howmanycharactersremaining() }}</span> <span class="spanlabel warning" ng-show="anycharactersover()" >{{howmanycharactersover()}} characters many</span>
when seek input text span counting below warn user of 2 characters minimum, countdown works , after stays there , not hide. sec 1 not show.
here plunker link functions , html. ideas why cant working?
thanks
in add-on @reins said, 2 other statements have these errors:
you're missing same function-calling brackets on anycharactersover
the homecoming statement in howmany
functions has bracket error. should
return ( characters < 0 ? math.abs(characters) : 0);
also, homecoming value of isnumberofcharacterswithinrange
should be:
$scope.minimumcharactersmet() && !$scope.anycharactersover();
plunker
ps: i'd utilize ng-hide
instead of ng-show(!)
angularjs
No comments:
Post a Comment