Parameter in view

30 views
Skip to first unread message

Julien

unread,
Apr 13, 2014, 9:20:23 AM4/13/14
to tot...@googlegroups.com
Hi,

How to use @{if model.idPicture !== ''} in javascript view ?

I have an error with @.

Thank you

Peter Širka

unread,
Apr 13, 2014, 12:13:03 PM4/13/14
to tot...@googlegroups.com
Hi Julien,
I must see whole example (with model implementation).

Problem:
model should not be null. Every condition must end with @{endif}.

Thanks :-)

Julien

unread,
Apr 13, 2014, 2:38:31 PM4/13/14
to tot...@googlegroups.com
Sorry for the confusion.

I would like to use the model in javascript.
Example:
<script>
   var i = @{model.similar}
</script>

Peter Širka

unread,
Apr 13, 2014, 2:41:51 PM4/13/14
to tot...@googlegroups.com
This must work (but model must be defined).
Reply all
Reply to author
Forward
0 new messages