template
<section id="content" ng-controller="ReservationController as resvnCtrl" >
<form role="form" name="resvnCtrl.form">
<div data-date-picker>
</div>
</form>
</section>
directive
var eateryDirectives=angular.module('eateryDirectives',['eateryControllers']);
eateryDirectives
.directive('datePicker',function(){
var directive={
require:'^resvnCtrl',
link:function(scope,ele,attrs,cntrl){
console.log(cntrl);
}
};
return directive;
});
I got controller could not find error. By the way controller and diretcive are in different modules. Does that matter? How to access that controller from directive?