Toggle content scroll from controller


#1

How can I toggle scroll in my content directive?
I’ve modified the starter template to demo what I want to achieve, it’ in the side menu: http://plnkr.co/edit/Hc0nEKwNKLSHgr3oi0sb?p=preview

If it will not work this way, I’m going to make a new layout.


#2

If I understand correctly, you want to toggle the side menu with a click on the list item right? Well I’ve accomplished that by doing

$rootScope.sideMenuController.toggleLeft();

on my side menu controller, of course you’ll have to inject the $rootScope to the controller.
I tried editing your plunker, but for some reason, the sideMenuController is directly in the scope like this

$scope.sideMenuController.toggleLeft();

so you have to test that in your actual development environment. Hope that helps.


#3

Let us know if that works, @cata_rock!


#4

No, I want to disable the scroll of the <content> from the controller, by setting a property “true” or “false” and then assigning it to the scroll attribute of it.

Edit:
But I’m almost sure that it isn’t possible after looking at the code. So I rewrote my layout, it was the fastest way.