Hi I append created element to parent:
container.append(UIService.appendWorkItem(workItem));
UIService
function appendWorkItem(item) {
return '<div layout="column" ng-init=item='+item+' class="md-whiteframe-1dp workItem workItemName" id='+item._id+'child> <div layout="row" layout-align="space-between" ng-click="workItemActivate('+item+')" ng-dblclick="openItemEdit('+item+')"> <div>'+item.name+'</div> <div> <md-icon md-font-icon="zmdi zmdi-share" title="Has parent child connection"></md-icon> </div> </div> <div class="dragulaParentDOM" > <div dragula="first-bag" id="'+item._id+'containerWorkItem" class="itemChildContainer"></div> </div> </div>'
}
I would like to set scope.item into this temlate. I use for it
ng-init=item='+item+'
but it doesn't work. how to do it?
A scope of work is a form that provides a detailed explanation of work that will be performed as part of a contract or subcontract. A scope of work (SOW) is important because it helps ensure that the parties involved are on the same page regarding expectations related to the project.
You must use ng-init with ""
.
ng-init="item='myData'"
You need to compile
it with scope.
container.append($compile(UIService.appendWorkItem(workItem))(scope));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With