Ich möchte diese iframe
in meiner Scala Play-Ansicht anzeigen;Scala Play Framework-URL in Iframe funktioniert nicht
<iframe src="http://localhost:9020/index.html#/group/sectiona/sectionb">Loading...</iframe>
Wenn ich diese URL hart Code, funktioniert es. Aber ich möchte, dass es dynamisch ist. Ich habe es versucht;
<iframe src="http://localhost:9020/index.html#/group/{{ 'http:\//localhost:9020\/#\/group\/' + myclass.section + '\/' + myclassb.section }}/testtopic">Loading...</iframe>
<iframe src="http://localhost:9020/index.html#/group/{{myclass.section}}/sectionb">Loading...</iframe>
<iframe class="graphiframe" src="{{ 'http:\//hello' + myclass.section + 'world'}}" frameborder="0" style="overflow:hidden" height="100%" width="100%">Loading...</iframe>
<iframe class="graphiframe" src="{{ 'http://hello' + myclass.section + 'world'}}" frameborder="0" style="overflow:hidden" height="100%" width="100%">Loading...</iframe>
etc ..
Nichts davon funktioniert. In 4 und 5, als ich das Element inspizierte, ist der gesamte src von iframe verschwunden, und ich habe einen iframe mit den Fehlermeldungen Action not found. For request 'GET /%7B%7B%20'http:///hello'%20+%20myclass.section%20+%20'world'%7D%7D'
bzw. Action not found. For request 'GET /%7B%7B%20'http://hello'%20+%20myclass.section%20+%20'world'%7D%7D'
bekommen. Ich habe Änderungen in application.conf wie play.filters.headers.frameOptions = null
vorgenommen. Es benutzt Play 2.4.0.
Wie kann ich das beheben?
beide versuchten. Es zeigt 'localahost: 9020/#/group/@ {@ myclass.section}' und im ersten Fall 'localahost: 9020/#/group/@@ myclass.section'. Wenn ich '{{}}' anstelle von '{}' verwende, funktioniert nichts. –