Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想实现一个完整的页面模式,当路由被触发时,它会立即覆盖在另一个页面上。我怎样才能在 AngularJS 上做到这一点?我使用 Angular-UI 的 modal 指令来打开模态,但我对其他选项持开放态度。
您可以使用 UI-Router 并根据事件创建特定的路由,以路由到您打开模式的状态。
旧的 AngularUI 模态非常有问题,最终被删除,但是如果你现在仍在使用它,我看不出它不适合你的特殊原因。但是,您可以修改 CSS 使其看起来像全屏,这可以通过将宽度和高度都设置为 100% 来轻松完成。
在你的控制器中,你也可以把$scope.showFullModal = true它出现。
$scope.showFullModal = true