I am trying to pass json object to angular directive but can't find any solution yet.
here is the code.
Directive
function agEcalendar() {
var directive = {
restrict: 'E',
templateUrl: 'app/components/ecalendar/ecalendar.html',
scope: {
event: '@event'
},
controller: EcalendarController,
controllerAs: 'vm',
bindToController: true
};
return directive;
}
and here i am calling the directive in jade
ag-ecalendar(event='{{vm.calendar.event}}')