我们有一个使用angular构建的应用程序,它有一个工作区,您可以在其中添加多个“仪表板”作为选项卡。用户可以加载多个powerbi对象。
同时加载多个1时会发生错误。这可能没有意义,但现在是:
reportEmbed.min.js:1 ERROR Error: [$injector:modulerr] http://errors.angularjs.org/1.6.8/$injector/modulerr?p0=%24%24UpgradeModule&p1=Error%3A%20%5B%24injector%3Amodulerr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.6.8%2F%24injector%2Fmodulerr%3Fp0%3Dpowerbi.reportembed%26p1%3DError%253A%2520%255B%2524injector%253Amodulerr%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.6.8%252F%2524injector%252Fmodulerr%253Fp0%253Dpowerbi.common%2526p1%253DError%25253A%252520%25255B%252524injector%25253Amodulerr%25255D%252520http%25253A%25252F%25252Ferrors.angularjs.org%25252F1.6.8%25252F%252524injector%25252Fmodulerr%25253Fp0%25253Doc.lazyLoad%252526p1%25253DError%2525253A%25252520%2525255B%25252524injector%2525253Anomod%2525255D%25252520http%2525253A%2525252F%2525252Ferrors.angularjs.org%2525252F1.6.8%2525252F%25252524injector%2525252Fnomod%2525253Fp0%2525253Dpowerbi.hosts%2525250A%25252520%25252520%25252520%25252520at%25252520https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A502%2525253A76%2525250A%25252520%25252520%25252520%25252520at%25252520https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A521%2525253A410%2525250A%25252520%25252520%25252520%25252520at%25252520b%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A520%2525253A439)%2525250A%25252520%25252520%25252520%25252520at%25252520https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A521%2525253A183%2525250A%25252520%25252520%25252520%25252520at%25252520Object.a.module%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A870%2525253A8006)%2525250A%25252520%25252520%25252520%25252520at%25252520b%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A870%2525253A3620)%2525250A%25252520%25252520%25252520%25252520at%25252520Object.r%25252520%2525255Bas%25252520forEach%2525255D%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A503%2525253A7)%2525250A%25252520%25252520%25252520%25252520at%25252520b%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A870%2525253A3683)%2525250A%25252520%25252520%25252520%25252520at%25252520Object.r%25252520%2525255Bas%25252520forEach%2525255D%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A503%2525253A7)%2525250A%25252520%25252520%25252520%25252520at%25252520b%25252520(https%2525253A%2525252F%2525252Fapp.powerbi.com%2525252F13.0.5557.137%2525252Fscripts%2525252Freportembed.externals.bundle.min.js%2525253A870%2525253A3683)%25250A%252520%252520%252520%252520at%252520https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A502%25253A76%25250A%252520%252520%252520%252520at%252520https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A538%25253A99%25250A%252520%252520%252520%252520at%252520r%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A503%25253A7)%25250A%252520%252520%252520%252520at%252520g%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A537%25253A180)%25250A%252520%252520%252520%252520at%252520https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A537%25253A365%25250A%252520%252520%252520%252520at%252520r%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A503%25253A7)%25250A%252520%252520%252520%252520at%252520g%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A537%25253A180)%25250A%252520%252520%252520%252520at%252520https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A537%25253A365%25250A%252520%252520%252520%252520at%252520r%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A503%25253A7)%25250A%252520%252520%252520%252520at%252520g%252520(https%25253A%25252F%25252Fapp.powerbi.com%25252F13.0.5557.137%25252Fscripts%25252Freportembed.externals.bundle.min.js%25253A537%25253A180)%250A%2520%2520%2520%2520at%2520https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A502%253A76%250A%2520%2520%2520%2520at%2520https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A538%253A99%250A%2520%2520%2520%2520at%2520r%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A503%253A7)%250A%2520%2520%2520%2520at%2520g%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A537%253A180)%250A%2520%2520%2520%2520at%2520https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A537%253A365%250A%2520%2520%2520%2520at%2520r%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A503%253A7)%250A%2520%2520%2520%2520at%2520g%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A537%253A180)%250A%2520%2520%2520%2520at%2520https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A537%253A365%250A%2520%2520%2520%2520at%2520r%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A503%253A7)%250A%2520%2520%2520%2520at%2520g%2520(https%253A%252F%252Fapp.powerbi.com%252F13.0.5557.137%252Fscripts%252Freportembed.externals.bundle.min.js%253A537%253A180)%0A%20%20%20%20at%20https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A502%3A76%0A%20%20%20%20at%20https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A538%3A99%0A%20%20%20%20at%20r%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A503%3A7)%0A%20%20%20%20at%20g%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A537%3A180)%0A%20%20%20%20at%20https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A537%3A365%0A%20%20%20%20at%20r%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A503%3A7)%0A%20%20%20%20at%20g%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A537%3A180)%0A%20%20%20%20at%20gb%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A541%3A254)%0A%20%20%20%20at%20c%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A517%3A19)%0A%20%20%20%20at%20Uc%20(https%3A%2F%2Fapp.powerbi.com%2F13.0.5557.137%2Fscripts%2Freportembed.externals.bundle.min.js%3A517%3A334)
at VM4966 reportembed.externals.bundle.min.js:502
at VM4966 reportembed.externals.bundle.min.js:538
at r (VM4966 reportembed.externals.bundle.min.js:503)
at g (VM4966 reportembed.externals.bundle.min.js:537)
at gb (VM4966 reportembed.externals.bundle.min.js:541)
at c (VM4966 reportembed.externals.bundle.min.js:517)
at Uc (VM4966 reportembed.externals.bundle.min.js:517)
at Object.a.bootstrap (VM4966 reportembed.externals.bundle.min.js:870)
at VM4984 reportEmbed.min.js:1
at VM4984 reportEmbed.min.js:1
在尝试加载另一个之前等待加载导致一切正常。
window.powerbi.embed
是不是设计用于同时处理多个嵌入?
答案 0 :(得分:1)
我也无法同时嵌入多个报告。
我通过post in PowerBI forums解决了这个问题:请确保在要加载报告/仪表盘/视觉效果的每个元素上都定义了一个id
属性。他们的JS库似乎在内部使用它。