我有这个刀片代码,想在calender.js的validateSlot函数中获取$ slot数组中name的值。如何获得?
我的Js功能代码:
$scope.validateSlots = function(x) {
namee = x['name'];
return true;
};
**And this is my Blade file's code :**
<div class="table-row table-body" ng-if="validateSlots.apply(this, slot)">
<div class="user-column table-cell">
<a class="center-vertically" href="{{route(" worker-profile ", [$slot['id']])}}">
<div title="{{isset($slot['service_string'])?$slot['service_string']:''}}">
{{$slot['name']}}
<span class="total-hours ">
<span>
</span>
</span>
</div>
</a>
</div>
答案 0 :(得分:0)
尝试一下:
$scope.validateSlots = function(x) {
name = "{{$slot['name']}}"; //array from your controller etc to blade JS file
return true;
};