如何通過'範圍'參數指令之外? 我需要一些其他組件中使用它..我怎樣才能通過'範圍'參數指令
我的代碼:
(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