javascript - Playing with placeholder in Angular -


is there kind of ng-placeholder or similar ?

i want put default placeholder risk, input calculation input, calculation last 2 seconds, want remove risk placeholder , put loader/spinner there. how have it

    <div>        <div>         <span ng-show="betloader"><div class="spinner"></div></span>         <div ng-show="!betloader">win</div>       </div>        <input placeholder="risk"              ng-model="parlaydata.win">     </div> 

i have there $scope variable betloader, when true loader/spinner appears, when false, div word win appears. want same not there, want in input placeholder risk, when betloader true, hide risk word.

what suggestions ?

edit

take account spinner in div class spinner. so, need put spinner within input.

you directly use interpolation {{}} directive directly in placeholder attribute.

markup

<input placeholder="{{betloader ? 'risk': ''}}" ng-model="parlaydata.win"> 

update

to update spinner content use ng-bind-html there.

html

  <div>     <div ng-bind-html="betloader ? '<span class="spinner"></span>': 'win'"><div class="spinner"></div></span>     <div ng-show="!betloader">win</div>   </div> 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -