私はこれを私のスカラ・プレイ・ビューに表示したいと思います。スカラPlayフレームワークのURLが正しく動作していない
<iframe src="http://localhost:9020/index.html#/group/sectiona/sectionb">Loading...</iframe>
このURLをハードコードすると動作します。しかし、私はそれが動的であることを望みます。私は試した;
<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>
など。この
なしに動作しません。 4と5で要素を調べるとsrc全体がiframeからなくなり、エラーメッセージAction not found. For request 'GET /%7B%7B%20'http:///hello'%20+%20myclass.section%20+%20'world'%7D%7D'
とAction not found. For request 'GET /%7B%7B%20'http://hello'%20+%20myclass.section%20+%20'world'%7D%7D'
のiframeが表示されます。私はplay.filters.headers.frameOptions = null
のようにapplication.confを変更しました。それは、プレイ2.4.0を使用しています。
どうすればこの問題を解決できますか?あなたは "魔法の『@』文字" 必要
でなければなりませんが、両方試してみました。これは 'localahost:9020 /#/ group/@ {@ myclass.section}'と、最初は 'localahost:9020 /#/ group/@@ myclass.section'です。 '{} 'の代わりに' {{}}'を使うと何も動かない。 –