0
我正在使用haml編碼以下代碼。我基本上在我的index.html.haml文件中有一堆嵌套的if-else語句。但是,我不斷收到以下代碼的語法錯誤。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;
如何修改我的代碼來解決這個語法錯誤?
謝謝!得到它了。 – Zhen