hi good morning,
i am trying to pass object from component to ui modal. pls
find the code below
$ctrl.open=function(data){
$uibModal.open({
template:'<my-modal greeting="$ctrl.greeting"
modal-data="$ctrl.modalData"></my-modal>',
controller:function(modalData){
var $ctrl = this;
$ctrl.greeting="hello";
$ctrl.modalData=modalData;
},
controllerAs:'$ctrl',
resolve:{
modalData:$ctrl.dataForModal
}
})
<div>
<ul>
<li ng-repeat="data in
$ctrl.data">{{data.name}}---{{data.age}}---{{data.occupation}}---<button
class="btn btn-default" ng-click="$ctrl.open(data)">Click
Me!!!</button></li>
</ul>
</div>
i am passing the object in $ctrl.open(data)
i want to use this object to obtain the id so the i can use it to update ..
pls help me with it
--
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.