use model.getId() instead of model.id
add missing semicolons
always use === for comparisons