Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(menu): fix potential scoping issues on mdMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmukler committed Jun 22, 2015
1 parent b4eac13 commit 4a6cd56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/menu/_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function MenuDirective($mdMenu) {
}

function link(scope, element, attrs, mdMenuCtrl) {

// Move everything into a md-menu-container and pass it to the controller
var menuContainer = angular.element(
'<div class="md-open-menu-container md-whiteframe-z2"></div>'
Expand Down Expand Up @@ -197,6 +196,7 @@ function MenuController($mdMenu, $attrs, $element, $scope) {
ctrl.isOpen = true;
triggerElement.setAttribute('aria-expanded', 'true');
$mdMenu.show({
scope: $scope,
mdMenuCtrl: ctrl,
element: menuContainer,
target: $element[0]
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/menu-interim-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function MenuProvider($$interimElementProvider) {
hasBackdrop: true,
disableParentScroll: true,
skipCompile: true,
preserveScope: true,
themable: true
};

Expand All @@ -38,7 +39,6 @@ function MenuProvider($$interimElementProvider) {
* various interaction events
*/
function onShow(scope, element, opts) {

// Sanitize and set defaults on opts
buildOpts(opts);

Expand Down

0 comments on commit 4a6cd56

Please sign in to comment.