I have some JS code like this:
switch(sc.article.type) {
case articleTypes.text:
template = "<div class='form-group'><div class='input-group' ng-show='article.suffix'><input class='form-control' type='text' ng-model='article.response'/><div class='input-group-addon'>{{ article.suffix }}</div></div><input class='form-control' type='text' ng-model='article.response' ng-show='!article.suffix'/></div><p class='help-block'>{{article.help}}</p>";
break;
case articleTypes.number:
... etc
I think this could be structured more nicely. For example, for each sc.article.type I could put that HTML code for template in its own HTML file rather than trying to define it in-line.
But how can I do that?