i using angularjs in project.
i have below code in html:
<div class="mt10" ng-init="getpaymentdetailsbyid()"> <div class="panel"> <div class="form-group"> <label> name:</label> <span class="rightside"> <input type="text" value="" ng-model="singlegatewaydetails.name" > </span> </div> <div class="form-group"> <label> app :</label> <span class="rightside"> <input type="text" value="" ng-model="paymentdetails.id" ng-disabled="appid"> </span> </div> <div class="form-group"> <label> app key:</label> <span class="rightside"> <input type="text" value="" ng-model="singlegatewaydetails.appkey" > </span> </div> <div class="form-group"> <label> app secret:</label> <span class="rightside"> <input type="text" value="" ng-model="singlegatewaydetails.appsecret"> </span> </div> </div> </div>
now
<span class="rightside"> <input type="text" value="" ng-model="paymentdetails.id" ng-disabled="appid"> </span>
this code displays data in textbox. , want display data in textbox in both scenario, while editing , while posting new data server. displays while editing not when want post new data server. textbox have value pre-filled in it. guessing have use condition on that. please me how achieve that.
i think know getting at. without seeing js file hard give example, using $scope.value in js , setting text {{value}} in html should provide desired result.