asp.net mvc - Angular binding model property to ng-click not passing value to MVC controller method -
i have calendar events on it, each having distinct eventid. when user clicks event, triggers angular controller method in turn gets data event via mvc controller , displays on page. have button on page when clicked should open modal edit details of data being displayed , using data binding set url modal window. data-ng-click attribute of button looks this:
data-ng-click="app.modal.openmodalwindow({ template: '[my url here]/?eventid={{vm.eventid}}' })"
in markup see this:
data-ng-click="app.modal.openmodalwindow({ template: '[my url here]/?eventid=18' })"
but when click button, browser trying following (from chrome network tab in dev tools):
get [my url here]/?eventid={{vm.eventid}} 500 (internal server error)
if take url markup or hard-code eventid works fine know not openmodalwindow i'm thinking sort of binding issue. have placed {{vm.eventid}} on page , know getting set properly, somehow not getting model.
the error getting parameter "eventid" in mvc controller cannot null, makes sense because i'm sending string value "{{vm.eventid}}" param type int. markup getting updated, data bound click event not. suggestions appreciated!
Comments
Post a Comment