OK, I finally solve it myself. I was wrong for two places:

   1. need to include the newest angular.js
   2. <div id='dv1' ng-repeat="robot in items" ng-if="robot.id>0"> , where 
   id is the primary key of type integer
   

On Sunday, April 6, 2014 4:29:17 PM UTC+8, T M wrote:
>
> Sorry, I did not make it clear. My current problem is robotsUpdate.html, 
> line#50,51::
>  
>     <div id='dv1' ng-repeat="robot in items">
>       <input type="hidden" ng-model="id" value="{{robot.id}}">
>
> I have no idea what should be the right way. I just want to carry in the 
> robot's ID (6 in this case) when page loads. I can understand the current 
> case is wrong, but.. how can I make it right?
>
>
>
> On Sunday, April 6, 2014 2:05:16 PM UTC+8, T M wrote:
>>
>> hi :
>>
>> I am a beginner of AngularJS. I want to write a basic sample using 
>> RESTful api. I made a robotsUpdate.html, and try satisfy the following 
>> requirements:
>>
>>    1. when page load, try to fill in the 5 fields 
>>    (id,name,description,type,year) with the corresponding value when the 
>> id=6 
>>    (line#10)
>>    2. when the field(s) get updated, and press the Add button, which 
>>    will trigger function add(). then will call to the put api (line#22)
>>
>> I understand some of my code could look funny. However, after I tried to 
>> read over a lot of sample or videos. I am still very confused. Can you tell 
>> me how I should correct my source code?
>>
>> Thank you very much!
>>
>>

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to