I am using a dynamic nested menu with the context menu.
My context menu reads
$scope.menuMenuOptions = function (item) {
var dateArray = [];
for (var i = 0; i < $scope.dateRange.length; i++) {
dateArray.push([$scope.currDateRange[i].date, function ($itemScope) {
//Do Something
$scope.doSomething($itemScope.element, /ChildScopeIndex/);
}], null);
}
['Date List', function ($itemScope) {
}, dateArray
]
}
From this you can get the parentScope from $itemScope but there isn't really a way to get the childScope, specifically the dateIndex selected of the childScope. Any ideas on how to get this index of the childScope that you select.
I am using a dynamic nested menu with the context menu. My context menu reads
$scope.menuMenuOptions = function (item) { var dateArray = []; for (var i = 0; i < $scope.dateRange.length; i++) { dateArray.push([$scope.currDateRange[i].date, function ($itemScope) { //Do Something $scope.doSomething($itemScope.element, /ChildScopeIndex/); }], null); } ['Date List', function ($itemScope) { }, dateArray ] }
From this you can get the parentScope from $itemScope but there isn't really a way to get the childScope, specifically the dateIndex selected of the childScope. Any ideas on how to get this index of the childScope that you select.
I tested with the example nested menu options
$scope.menuOptions = [ ['Parent Item 1', function ($itemScope) { // Code }, [ ['Child Item 1', function ($itemScope) { // Code }], ['Child Item 2', function ($itemScope) { // Code }] ] ] ];
and I couldn't find a way to identify that the user has selected Child Item 1 or Child Item 2.