Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$.ajaxSetup({dataType:'json'}) を設定するとテンプレートの読み込みに失敗する #396

Closed
mtakeuchi opened this issue Aug 19, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@mtakeuchi
Copy link
Contributor

$.ajaxSetup()で dataType:'json' を設定後、コントローラで.ejsファイルに書かれているテンプレートをロードしようとすると

[ERROR]14:49:58,206: テンプレートファイルを取得できませんでした。ステータスコード:200, URL:http://localhost:8080/xxxxxxx/template/test.ejs h5.js:2716
[ERROR]14:49:58,206: コントローラ"HogeController"のテンプレートの読み込みに失敗しました。URL:http://localhost:8080/xxxxxx/template/test.ejs 

というエラーが発生する。

  • test.ejs
<script type="text/ejs" id="tmpl1"></script>
  • test.js
$(function() {
  $.ajaxSetup({dataType:'json'});

  h5.core.controller('body', {
    __name: 'HogeController',
    __templates: 'template/test.ejs'
  });
});
@simdy simdy added this to the v1.1.13 milestone Aug 19, 2014
fukudayasuo pushed a commit to hifive-labs/hifivemain that referenced this issue Aug 20, 2014
『$.ajaxSetupでdataTypeに"json"が指定されているときに正しくテンプレートファイルをロードできること』
@simdy simdy added the bug label Aug 22, 2014
@simdy
Copy link
Member

simdy commented Aug 22, 2014

ver.1.1.13では、暫定的にdataTypeについて対応します。
ajaxSetupの他のパラメータについては別途検討します。

@simdy simdy closed this as completed Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants