Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the dependencies of directive #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions acute/acute.core/acute.core.directives.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module("acute.core.directives", [])
// Directive to set focus to an element when a specified expression is true
.directive('acuteFocus', function ($timeout, $parse) {
.directive('acuteFocus', ["$timeout", "$parse", function ($timeout, $parse) {
return {
restrict: "A",
link: function (scope, element, attributes) {
Expand All @@ -19,7 +19,7 @@
});
}
};
})
}])

// Directive for a scroll container. Set acute-scroll-top to an expression and the div will scroll when it changes
.directive('acScrollTo', function () {
Expand Down
2 changes: 1 addition & 1 deletion acute/acute.core/acute.core.services.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
angular.module("acute.core.services", [])

// safeApply service, courtesy Alex Vanston and Andrew Reutter
.factory('safeApply', [function ($rootScope) {
.factory('safeApply', ['$rootScope', function ($rootScope) {
return function ($scope, fn) {
var phase = $scope.$root.$$phase;
if (phase == '$apply' || phase == '$digest') {
Expand Down
10 changes: 5 additions & 5 deletions acute/acute.select/acute.select.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Note:- ac-options works like ng-options, but does not support option groups

angular.module("acute.select", [])
.directive("acSelect", function($parse, acuteSelectService) {
.directive("acSelect", ["$parse", "acuteSelectService", function($parse, acuteSelectService) {
var defaultSettings = acuteSelectService.getSettings();
return {
restrict: "EAC",
Expand Down Expand Up @@ -868,10 +868,10 @@ angular.module("acute.select", [])
}
}
};
})
}])

// Directive to set focus to an element when a specified expression is true
.directive('acFocus', function($timeout, $parse, safeApply) {
.directive('acFocus', ["$timeout", "$parse", "safeApply", function($timeout, $parse, safeApply) {
return {
restrict: "A",
link: function(scope, element, attributes) {
Expand All @@ -890,7 +890,7 @@ angular.module("acute.select", [])
});
}
};
})
}])

.directive('acSelectOnFocus', function() {
return {
Expand Down Expand Up @@ -965,7 +965,7 @@ angular.module("acute.select", [])
})

// safeApply service, courtesy Alex Vanston and Andrew Reutter
.factory('safeApply', [function($rootScope) {
.factory('safeApply', ['$rootScope', function($rootScope) {
return function($scope, fn) {
var phase = $scope.$root.$$phase;
if (phase == '$apply' || phase == '$digest') {
Expand Down