This is the pseudo code 

   1. 
   
   Web App: nametester.html ————————————————
   Uses: AngularJS ------------------------------ --- Model: 
   
     - strName (which stores a String value)
     ------------------------------
     --- Steps:
     1: Assign strName using ng-model with the prompt:
   
        'Please enter your name:'
     2: ng-show (if)"strName == '—add your name here—'"
   
   3: Output 'Awesome name!'
   4: ng-hide (else)"strName == '—add your name here—'" 5: Output strName, 
   ' is a not my name'
   
   Use the lowercase filter to convert the value of a variable into 
   lowercase before you compare.
   
   And my code
   
   <body>
   
   
   
           <h1>Name Tester App</h1>
   
           
   
           <p><label for="name">Please Enter Your Name:</label>
   
           <input type="text" id="name" data-ng-model="strName"/></p>
   
               <p>
   
                   <span data-ng-show ="strName =='Ben'">Awesome Name!
   </span>
   
                   <span data-ng-hide ="strName =='Someone'">'strName' 
   Sweet!</span>
   
               </p> 
   
   
   But it doesn't work. I am seeing 'strName' Sweet! even when the text 
   input is blank and when I do fill in some random name the 'strName' doesn't 
   change to the entered text.
   
   Show works. When I put my name I do get output in the format
   
   Awesome Name! 'strName' Sweet!
   
    
   

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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