Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mangesh-P opened this issue Feb 21, 2017 · 2 comments
Open

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

Mangesh-P opened this issue Feb 21, 2017 · 2 comments

Comments

@Mangesh-P
Copy link

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 Mangesh-P changed the title Using ps-push="true" with ps-container How to use ps-push="true" with ps-container Feb 21, 2017
@daerogami
Copy link

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.

@wadigzon
Copy link

wadigzon commented Feb 2, 2018

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants