Set 'value' of input field in the form itself and not via controller


#1

I would like to set the ‘value’ of a input field in the form and not via controller. e.g. I want to set the value of below hidden field ‘searchTyp’ to ‘app’. How can I do it? Kindly help.


        
        
        

        
            
            X
        
        Search
        
        

#2

you have to use the ng-model=“search.Typ = ‘app’” in the view so that the value is set during view load. Rest you need to code in controller.


#3

Thanks @gaurav_ch. It worked!


#5

It seems correct format is as below and this works. Thanks


      

#6

Thanks @subhashp . It worked greatly that way