javascript - How to create a simple search input text in AngularJS material design? -


i looking easy way have similar available in angular-mdl expandable search text field below.. add search button on click expand text field.

<!-- expandable textfield --> <form action="#">   <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">     <label class="mdl-button mdl-js-button mdl-button--icon" for="sample6">       <i class="material-icons">search</i>     </label>     <div class="mdl-textfield__expandable-holder">       <input class="mdl-textfield__input" type="text" id="sample6">       <label class="mdl-textfield__label" for="sample-expandable">expandable input</label>     </div>   </div> </form> 

my requirement have such search button in card title snapped right when user clicks should expand take input.. , need in angular-material.

any inputs or help..! thanks.

i looking example of expandable search in angular material too, , found code in codepen, not sure if it's for, opens full length input button...

http://codepen.io/kyleledbetter/pen/gbqoav

the html of toolbar this:

<md-toolbar ng-show="!showsearch">   <div class="md-toolbar-tools">     <md-button ng-click="togglesidenav('left')" hide-gt-md aria-label="menu">       <ng-md-icon icon="menu"></ng-md-icon>     </md-button>     <h3>         dashboard       </h3>     <span flex></span>     <md-button aria-label="search" ng-click="showsearch = !showsearch">       <ng-md-icon icon="search"></ng-md-icon>     </md-button>     <md-button aria-label="open settings" ng-click="showlistbottomsheet($event)">       <ng-md-icon icon="more_vert"></ng-md-icon>     </md-button>   </div> </md-toolbar> <md-toolbar class="md-hue-1" ng-show="showsearch">   <div class="md-toolbar-tools">     <md-button ng-click="showsearch = !showsearch" aria-label="back">       <ng-md-icon icon="arrow_back"></ng-md-icon>     </md-button>     <h3 flex="10">               </h3>     <md-input-container md-theme="input" flex>       <label>&nbsp;</label>       <input ng-model="search.who" placeholder="enter search">     </md-input-container>     <md-button aria-label="search" ng-click="showsearch = !showsearch">       <ng-md-icon icon="search"></ng-md-icon>     </md-button>     <md-button aria-label="open settings" ng-click="showlistbottomsheet($event)">       <ng-md-icon icon="more_vert"></ng-md-icon>     </md-button>   </div>  </md-toolbar> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -