<a data-ng-href="@Url.Action("action",
"controller")?param={{item.id}}">Link</a>
Vào 22:55:24 UTC+7 Thứ Tư, ngày 10 tháng 10 năm 2012, neverCwitt đã viết:
>
> We're working on an MVC application and we're using AngularJS for
> validation mostly but we would like to use it for more if possible.
>
> So we're going to have some pages that will list some items in a table. My
> first thought was to use ajax to get a json object with a list of the
> items, and use ngRepeat to generate the table. Then with user input we can
> use Ajax to send edit/add commands to the server and Angular to push a
> pending item into the json object list.
>
> Our concern is that the table may need to have MVC action links, and how
> could this work with ngRepeat? Since action links are server side code, and
> Angular is all client side. I'm wondering if anyone has run into this and
> knows a good way to handle it.
>
> Here is some pseudo code to show what I think will not work:
>
> <table>
> <tr ngRepeat>
> <td>{{item name}}</td>
> <td>{{item description}}</td>
> <td>@MVC.ActionLink("View", "Controller", {{ItemID}});</td>
> </tr>
> </table>
>
> So I know this won't work. What I'm wondering is if anyone has come across
> this before and figured it out already? Maybe I should just forget about
> using AngularJS to generate the table at all?
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" 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.