Google дает мне ошибку: «TypeError: Невозможно прочитать свойство« открыто »неопределенного» в ответ на мой модуль ui-bootstrap. Я использую другие директивы ui-bootsrap.Modal возвращается неопределенно в директиве
Я не объявляю модальную зависимость правильно?
angular.module('ireg').directive('study', function (studyFactory) {
return {
restrict:'E',
scope: {
objectid:'@objectid'
},
templateUrl: '/ireg/components/study/study.html',
link: function (scope, element, attrs, $modal) {
scope.openMilestonesDialog = function() {
var modalInstance = $modal.open({
animation: $scope.animationsEnabled,
templateUrl: '/ireg/components/add-milestones/addMilestonesDialog.html',
controller: '/ireg/components/add-milestones/addMilestonesDialogController.js',
size: lg
});
};
}//end of link
}
});
angular.module('ireg').controller('addMilestonesDialogController', function ($scope, $modalInstance, studyId) {
$scope.ok = function() {
$modalInstance.close();
};
});
Я думаю, что 'размер: lg' вызывает проблему. Попытайтесь изменить его с помощью 'size: 'lg''. –