c# - Pass Id to controller through ng-include -
how id view controller in ng-include?
i have following view:
@model nybroe.fightplan.sql.model.eventrecord @{ var eventid = model.id; } <div ng-app="tournamentapp"> <div ng-include src="'/apps/modules/fightcard/fightcard.html'"> <div ng-init="id = @eventid"></div> </div> </div>
the ng-controller defined in fightcard.html template.
and trying id parameter controller so:
$scope.evid = $scope.id
but turns undefined.
i hope guys can me out! :) thank in advance.
use object notation x.id , should work. id in isolated scope
Comments
Post a Comment