Hi Dong,

Why don't use use an ngIf? ngSwitch really has a different use-case.. 
 <div ng-if="!searchString">
    <p><strong>Default content</strong></p>
  </div>

  <div ng-if="!!searchString">
    <!--get the input value-->
    <ul>
      <li ng-repeat="i in items | searchFor:searchString">
        <p>{{i.adresse}}</p>
      </li>
    </ul>
  <div>

The !! does cast the variable to a boolean. Will work without, but I like 
this better.

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to