mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Use $scope instead of scope in directives
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var count = 0;
|
||||
(function(){
|
||||
|
||||
angular
|
||||
@@ -9,10 +10,10 @@
|
||||
function expandMenu() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, element, attrs) {
|
||||
link: function($scope, element, attrs) {
|
||||
element.on('click', function(event) {
|
||||
scope._expandedMenu = (scope._expandedMenu == attrs.menu) ? null : attrs.menu;
|
||||
scope.$apply()
|
||||
$scope._expandedMenu = ($scope._expandedMenu === attrs.menu) ? null : attrs.menu;
|
||||
$scope.$apply()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user