*Thanks Robert*
*sorry for bad understanding you i have create new post for that on
: https://groups.google.com/forum/#!topic/angular/M_DtyUKAWJY
<https://groups.google.com/forum/#!topic/angular/M_DtyUKAWJY>*
*i have added there full codes hope you reply there with more details or
example to let me understand it *
*Note: i try other solution by set listOfOrders = null; in my api
Controller Constractor and pass **listOfOrders in other list to loop throw
it when need to save data in database (that works)*
*but i need to know other way to learn how to do it with angular (set this
section empty when i open new invoice in any pc ) i think problem is here*
* <tr ng-repeat="ord in orders"> <td align="center"
style="vertical-align:middle; font-weight:bold;">
{{ord.ProductID}} </td> <td align="center"
style="vertical-align:middle; font-weight:bold;">
{{ord.ProductName}} </td> <td align="center"
style="vertical-align:middle; font-weight:bold;"> {{
ord.Quantity}} </td> <td align="center"
style="vertical-align:middle; font-weight:bold;">
{{ord.SellPrice}} </td> <td class="text-center"
style="vertical-align:middle; font-weight:bold;">
{{ord.SellPrice * ord.Quantity | currency}} </td> <td
align="center" style="vertical-align:middle;"> <input
type="submit" name="submitbtn" value="x" class="btn btn-danger"
ng-click="remove(ord.ProductID,$index)" style="font-weight:bold;" />
</td> </tr>Thanks a lot .... *
On Wednesday, June 10, 2015 at 2:22:46 PM UTC+2, Robert STAICU wrote:
>
> Hello again. I think you should've done another post for this.
>
> I looked over your code. I pasted it into my notepad++ and deleted
> saveInvoice cause is never called, remove() cause i don't think it's
> relevant, keypress never called(I think cause it was commented that input).
>
> What i really think is wrong is your backend. I really haven't found any
> mistake in angular stuff. So let's clear something.
>
> You have a form that comunicate with server trough kendo(i don't know
> nothing about kendo just that "is two way data binding"). You create a new
> invoice that is stored live to your server and updated live too. And if you
> don't save it and go on another Pc you can see that invoice.
> If that is the case i think you should rethink this.
>
> If i press create i would create a new invoice with an id of 1(let's say
> one cause it doesn't exist for now). I just play with that.
> If i press again create i would create a new invoice with an id of 2(cause
> 1 already exist) And i'll be sure that every time i create a new invoice on
> my backend i'll do it empty.
>
> So your url will look like this(back-end and front-end)
> 'blablabla/invoice/1' and 'blablabla/invoice/2' Your server will look for 1
> or 2 and get that specific data. This is called restfull so i think that's
> all you wanna do in this case.
>
> This is what i understood from your code. If i'm mistake corect me.
>
> Have a nice day...and btw when you will get details your url will be
> "/api/CustomerService/invoice/1/getDetails" and "/api/
> CustomerService/invoice/2/getDetails"
>
>
--
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.