如何通过'范围'参数指令之外? 我需要一些其他组件中使用它..我怎样才能通过'范围'参数指令
我的代码:
(function() {
angular.module('dmv.shared.components').
directive('doImportPackage', ['Package', function (Package) {
return {
restrict: 'A',
scope: {
onStart: '<',
onFinish: '<',
onError: '<'},
link: function (scope, element, attributes) {
}
TNX!
指令自动继承父'$ scope'。 – Nirus
使用'$ scope。$ parent'来访问父范围 – azad