I am using express server and angular client. I use jade to write express template and the code is very clean.
for example, in index.jade
html
head
title!= title
body
h1!= message
Then I can just compile the jade file into html file
app.get('/', function (req, res) {
res.render('index', { title: 'Hey', message: 'Hello there!'});
});
Now I am moving some logic to the client to prevent page loading. The drawback is that angular template is as verbose as normal html code. Files get long and messy soon.
For example, in my profile template, I have this
<div class="my-panel-body">
<table class="my-table">
<!--email-->
<tr>
<th>Email</th>
<td>{{entity.email}}</td>
</tr>
<!--gender-->
<tr>
<th>Gender</th>
<td>{{entity.meta.gender}}</td>
</tr>
<!--dob-->
<tr>
<th>Date of Birth</th>
<td>{{entity.meta.dob}}</td>
</tr>
<!--country-->
<tr>
<th>Country</th>
<td>{{entity.meta.country}}</td>
</tr>
<!--city-->
<tr>
<th>City</th>
<td>{{entity.meta.city}}</td>
</tr>
<!--status-->
<tr>
<th>Status</th>
<td>{{entity.meta.status}}</td>
</tr>
It would be great if I can write things like
div
table
head
tr
th Date of Birth
td {{entity.dob}}
tr
th Email
td {{entity.email}}
It doesn't have to be jade. I am ok with any language as long as its clean and short