angularjs UI引导模式与谷歌的地方

时间:2014-11-18 22:46:27

标签: angularjs google-maps google-places-api angular-ui-bootstrap

我试图在UI Bootstrap模式中打开Goog​​le Maps Places自动填充地址表单。我的问题是google地点下拉显示在模态后面,无论如何都要将它放在模态之上以便你可以看到它吗?

地址表https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

Bootstrap http://angular-ui.github.io/bootstrap/

任何帮助或想法都会有很大帮助。

3 个答案:

答案 0 :(得分:37)

原来这只是一个z索引问题,通过在CSS中添加以下内容来解决问题。

.pac-container {
    z-index: 100000;
}

答案 1 :(得分:2)

我有angular7 +引导程序模态 这对我不起作用

所以我添加:: ng-deep,请参阅下面的最终CSS

::ng-deep .pac-container { z-index: 100000; }

感谢refercus的解决方案!

答案 2 :(得分:0)

也许这个问题与某人有关。我使用有角度的材质,如果使用matDialog,则相对于页面顶部显示自动竞争。 这对我有帮助:

[
    {
        "Name": "cieenetwork",
        "Id": "a58547f1d257eae4880f5411482bb33be4534a4299e55b0e40780e3f6679f521",
        "Created": "2020-09-30T17:49:38.9145072Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "1989d9a75c0d8722a89a879d57d5c2d454507ff43f3b4b79742469556d48b387": {
                "Name": "stanfordcorenlp",
                "EndpointID": "c8aff59b96aa2816daee7cf4e82b9d894a56d8870be935ac28c1b1754eb62aed",
                "MacAddress": "02:42:ac:14:00:02",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            },
            "1b4e4d92b2597077027bbce9f8aa22a137de581592c58d7dc0204f452ce7e2ca": {
                "Name": "pbnginx",
                "EndpointID": "1f3c78aa73463610d166d3ba10792e095bee76ace3b29c1e81da567456dacdd1",
                "MacAddress": "02:42:ac:14:00:04",
                "IPv4Address": "172.20.0.4/16",
                "IPv6Address": ""
            },
            "c332c8e378e192f661ebb17f6b8ee9a88c47c76355e9a2acc4ecc34a9687a1de": {
                "Name": "pbdjango",
                "EndpointID": "c78c8d3e92472191f24f2c6bcc7108038a754bb5f933a49f59bd4e6243d1295e",
                "MacAddress": "02:42:ac:14:00:03",
                "IPv4Address": "172.20.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]