Skip to content

Commit ca4d77d

Browse files
author
scates
committed
Cleaned up some debug code and fixed variale definition for title
1 parent 16ec778 commit ca4d77d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/dropdown/dropdown.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ angular.module('angularify.semantic.dropdown', ['ngSanitize'])
5353
} else {
5454
scope.open = false;
5555
}
56-
console.log(scope.open)
5756
DropDownController.add_item(scope);
5857

5958
//
@@ -108,10 +107,14 @@ angular.module('angularify.semantic.dropdown', ['ngSanitize'])
108107
},
109108
template: '<div class="item" ng-transclude >{{title}}</div>',
110109
link: function(scope, element, attrs, DropDownController) {
110+
111+
// Check if title= was set... if not take the contents of the dropdown-group tag
112+
// title= is for dynamic variables from something like ng-repeat {{variable}}
113+
var title;
111114
if (scope.title === undefined) {
112-
var title = scope.title
115+
title = scope.title;
113116
} else {
114-
var title = element.children()[0].innerHTML;
117+
title = element.children()[0].innerHTML;
115118
}
116119

117120
//

0 commit comments

Comments
 (0)