ng-pageslide icon indicating copy to clipboard operation
ng-pageslide copied to clipboard

How to use ps-push="true" with ps-container

Open Mangesh-P opened this issue 8 years ago • 2 comments

I want to use pageslide inside a container.

I see the code param.push = param.push && !param.container; which means I cannot use push inside the container.

Is this true. If not how can i push the content inside the container.

Mangesh-P avatar Feb 21 '17 20:02 Mangesh-P

I can't tell you which is best practice but the idea is that you expose the 'open' boolean (via event, rootscope, or valueProvider) from your PageslideController so the container's parent's controller knows its open. Then use ng-class="{'css-class-for-pushing': exposedOpenBool}" on the elements you want to move.

To be more terse, pageslide will only insert the element, its up to you to move the sibling elements around. My example above is not the only way to achieve this and may have pitfalls I haven't considered.

daerogami avatar Feb 22 '17 22:02 daerogami

I had to do what daerogami said. My panel was showing from the right and content was being pushed to the left. Style used was { position: relative; left: -300px; }. Used ng class on the content view and $scope.$on, to catch that message, also use $scope.$on @ $rootScope to gather the signaling and forward the actual message to the sibling $scope (content scope - not directly related to initiating scope).

wadigzon avatar Feb 02 '18 17:02 wadigzon