[英]angular position fix inside a controller (angular modal?)
This is sort of a weird problem that is a mix of css and angular. 这是一个奇怪的问题,是css和角度的混合。
I have a div item that is in the main content area of my app that has a few smaller div containers in side of it. 我的应用程序的主要内容区域中有一个div项,它的侧面有一些较小的div容器。 Basically, inside of one of these sub divs I want to be able to click something and have a modal come up and position fix until it's closed.
基本上,在这些细分之一中,我希望能够单击某些内容并显示模式并定位,直到将其关闭。
The problem I am having is that is I would have to put something in the body to fix it to float in the center of the screen, and I feel like I only have control over items (within the controller in the sub div container). 我遇到的问题是,我将不得不在体内放置一些东西以使其固定在屏幕中央,并且感觉只能控制项目(在sub div容器内的控制器内)。 So if this were just jquery/javascript I would just append a modal to the body with position fixed.
因此,如果这只是jquery / javascript,我将在位置固定的情况下向主体附加一个模式。 My questions is how to deal with this in angular in this scenario?
我的问题是在这种情况下如何处理这个问题? How can i control a modal that I would normally have to append to a body to get the correct position fixed effect from inside a controller that's tucked into a bunch of divs.
我该如何控制通常必须附加到主体的模态,才能从嵌入到一堆div中的控制器内部获得正确的位置固定效果。
Thanks! 谢谢!
Have you looked at the Angular UI Bootstrap? 您是否看过Angular UI Bootstrap? They have a modal component there:
它们在那里有一个模态部分:
http://angular-ui.github.io/bootstrap/ http://angular-ui.github.io/bootstrap/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.