我们有一个AngularJS / Angular混合应用程序。在此应用中,我们尝试执行以下操作(使用应用的AngularJS部分):
<div data-url="https://brand.typeform.com/to/{{survey_id}}"></div>
但这不起作用,出现以下错误:
Unhandled Promise rejection: JSONP request to https://admin.typeform.com/app/embed//to?jsoncallback=? failed ; Zone: <root> ; Task: Promise.then ; Value: Error: "JSONP request to https://admin.typeform.com/app/embed//to?jsoncallback=? failed"
onerror https://embed.typeform.com/embed.js:1:142131
wrapFn http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:240657:30
invokeTask http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239890:17
runTask http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239657:28
invokeTask http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239965:24
invokeTask http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:241009:9
globalZoneAwareCallback http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:241035:17
d http://cdn.ravenjs.com/3.21.0/angular/raven.min.js:2:5070
a/e.exports/</p.onerror@https://embed.typeform.com/embed.js:1:142131
wrapFn@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:240657:30
./node_modules/zone.js/dist/zone.js/</</ZoneDelegate.prototype.invokeTask@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239890:17
./node_modules/zone.js/dist/zone.js/</</Zone.prototype.runTask@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239657:28
./node_modules/zone.js/dist/zone.js/</</ZoneTask.invokeTask@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:239965:24
invokeTask@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:241009:9
globalZoneAwareCallback@http://localhost:8080/js/vendors.d4d54ba468c86e86d307.js:241035:17
d@http://cdn.ravenjs.com/3.21.0/angular/raven.min.js:2:5070
如果我手动添加URL https://brand.typeform.com/to/123456
,它将起作用。
如何将括号符号传递给此元素?