ace icon indicating copy to clipboard operation
ace copied to clipboard

Are conditionals possible?

Open elorest opened this issue 6 years ago • 1 comments

In Haml, Slim, Slang I'm used to the following.

- if name.size > 10
  | You have a long name.
- else
  | You're name is average.

Is there anyway to achieve something similar with Ace?

elorest avatar Mar 25 '18 07:03 elorest

1   doctype html
  1 html(lang="en")
  2     head
  3         title= Title
  4     body
  5         h1= Title
  6         if SessionId == ""
  7             p Login
  8             p
  9                 form(method="POST")
 10                     div Username
 11                         input(type="text" name="username")
 12                     div Password
 13                         input(type="password" name="password")
 14                     div Secret Key
 15                         input(type="text" name="key")
 16                     div
 17                         input(type="submit" name="submit" value="Login")
 18         else
 19             p login complete
 20             p= SessionId

rdbell avatar Nov 28 '18 02:11 rdbell