4
Спосіб виклику в контролері директив від іншого контролера
У мене є директива, яка має власний контролер. Дивіться код нижче: var popdown = angular.module('xModules',[]); popdown.directive('popdown', function () { var PopdownController = function ($scope) { this.scope = $scope; } PopdownController.prototype = { show:function (message, type) { this.scope.message = message; this.scope.type = type; }, hide:function () { this.scope.message = ''; this.scope.type …