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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -