【发布时间】:2023-07-14 15:59:01
【问题描述】:
我正在使用 haml 来编写以下代码。我的 index.html.haml 文件中基本上有一堆嵌套的 if-else 语句。但是,我不断收到以下代码的语法错误。
- if current_user
:javascript
window.is_logined_in = true;
window.currentUserJSON = #{@current_user_json};
//Getting syntax error for the line below
- if window.currentUserJSON.user.following_count == 293 && window.currentUserJSON.user.answer_count == 276
window.complete_orientation = true;
- else
window.complete_orientation = false;
- else
:javascript
window.is_logined_in = false;
如何修改我的代码来解决这个语法错误?
【问题讨论】:
标签: jquery html if-statement haml syntax-error