Last active
August 29, 2015 14:09
-
-
Save GulinSS/c506d706a6fd2e0d08da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('...').directive('...', [ | |
function() { | |
return { | |
scope: { | |
service: '@' | |
}, | |
link: function (scope, elm, attrs) { | |
scope.serviceInjected = elm.injector().get(scope.service); | |
} | |
} | |
} | |
]); |
А почему не стали использовать $injector.get('service')
?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In template:
<... service="someService"></...>