0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LaravelでJavaScriptが動作しないとき

Posted at

##LaravelでJavaScriptが動作しないとき

いつも通りにJavaScriptを書いたのに、どこにもエラーはなく、Consoleでは正しく動作しているのにも関わらずblade上でJavaScriptが動かないとき。

なかなか無いとは思いますが、遭遇してしまい、時間を無駄にしたのでメモ。

結論。app.jsのせい。
body下部にapp.jsを書きますが、そのapp.jsより下に書けば動作しました。

<script src="{{ asset('/js/app.js') }}"></script> 
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?