Home Access directive method from the angularjs service
Reply: 0

Access directive method from the angularjs service

user940 Published in July 16, 2018, 6:24 am

I have method in directive here i need to access this method from angularjs service.

For Example:


angular.module('myServiceModule', []).controller('MyController', ['$scope','notify', function($scope, notify) {}]).service('notify', ['$window',function(win) {            


angular.module('docsSimpleDirective', []).controller('Controller', ['$scope', function($scope) {}]).directive('myCustomer', function($scope) {
    $scope.enableEditor = function(){ 
    return {

In my project i need to access directive method from angularjs. For example i have added sample code.
In directive i have enableEditor() method i need to be access this method form my angular services.
I searched on web i did not get proper solution for accessing directive method from angular service.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.344841 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO