javascript - Passing value through the ng-include tag -
i new angular js. have requirement values database user.html. in page (user.html) need call details.html using ng-include tag call details.html. while calling need pass values details.html, value dynamic, dynamic value need pass details.html.
example:
routemanager.js:  .when( '/mydetails', {   templateurl : "./client/assets/views/user.html",   controller  : "mydetailscontroller"  })  user.html:  <div ng-include="'client/assets/views/details.html'" {{here need pass 2 parameters }}></div>  details.html:  <h1>{{need display 2 parameters}}</h1> note: details.html there not controller. need without controller.
you can use onload:
<div ng-include="'mycomponent.html'"      ng-controller="mycomponentcontroller"      onload="myitem = myitemvalue"> </div> this recommended way in documentation.
Comments
Post a Comment