danielepiccone / ng-pageslide

AngularJS sliding panel for serving additional content from off the page
http://danielepiccone.github.io/ng-pageslide/examples/
451 stars 160 forks source link

ps-key-listener, ps-click-outside re-open issue #133

Open resistancecanyon opened 8 years ago

resistancecanyon commented 8 years ago

If we set either ps-keylistener or ps-click-outside to true, the slider is working properly & closes the first time. The second time we try to open the slider by setting ps-open="scopeVariable" & setting $scope.scopeVariable=true; The slider won't open again. The scope variable is not affected anymore.

I had to made it work by using manual ng-click on a button to explicitly set the $scope.scopeVariable to true & false

version : ng-pageslide#^2.0.1

songokudbz commented 7 years ago

I can't make it work! How did you fixed this?

songokudbz commented 7 years ago

I've fixed this by adding $parent: <div pageslide ps-open="$parent.isMenuOpened"... . In my case i was including the template with ng-include, so I needed to add $parent. Hope it helps.

danielepiccone commented 7 years ago

I am trying to replicate it, but I am not able to. There's an example with the key listener, and it keeps working when you use the key listener to close and the button (which flips $scope.open bound to ps-open) to true. Could you put together a plunker for this?

songokudbz commented 7 years ago

Yes I will try to put one together when I have a little time. Seasons greetings until then.

danielepiccone commented 7 years ago

Likewise :christmas_tree: :christmas_tree: :christmas_tree: :)