我正在尝试制作一个从控制器数据中制作carousal的指令
这是我的
----------控制器---------
myApp.controller('myCtrl', function($scope){
$scope.outfit = {
name : 'guess',
price : '100$'
};
$scope.myLook= {
name : 'guess',
price : '100$'
};
$scope.tabs = [
{ title:"THE RUNWAY" , data : 'outfit'},
{ title:"MY LOOK", data : 'myLook'},
];
);
------我的指示--------
myApp.directive('bxSlider',function(){
return {
restrict : 'E',
templateUrl : require.toUrl('../partials/bxSlider.html'),
replace: true,
scope: {
outs : "="
}
}
});
------我的模板--------
<div ng-controller="myCtrl">
<div ng-repeat="tab in tabs">
<bx-slider outs="{{ tab.data }}" />
// i want my outs param value as the output of tab.data as param
// i.e outfit or mylook **how can i do that is there any workaround**
</div>
</div>