I have a submitDetails function inside controller in app.js file and I want to call it from a javascript function. But its throwing error Error: Submit Details is undefined
clickApply: function(e) {
console.log("hi&hello");
angular.element('#span').scope().submitDetails();
this.hide();
this.element.trigger('apply.daterangepicker', this);
}
$rootScope.submitDetails=function()