search

Home  >  Q&A  >  body text

angular.js - angularJs

How to make placeholder=" " equal to different values ​​according to two different conditions in angularJs.
<input type="text" name="keyWords" id="keyWords" placeholder="Keyword 1/Keyword 2" class="search-style">

为情所困为情所困2813 days ago562

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-15 17:01:19

    <input type="text" name="keyWords" id="keyWords" placeholder="{{myPlaceholder}}" class="search-style">

    Inside Controller

    $scope.myPlaceholder = '关键词';

    reply
    0
  • Cancelreply