moved component templates to separate files in order to support HTML syntax highlighting in certain editors

This commit is contained in:
alecmerdler 2017-02-17 21:35:33 -08:00 committed by Joseph Schorr
parent 00b1f0e3cc
commit 39c18eb216
8 changed files with 93 additions and 159 deletions

View file

@ -2,42 +2,12 @@ import { Input, Component } from 'angular-ts-decorators';
/**
* An element which displays the matches and non-matches for a regular expression against a set of
* A component that displays the matches and non-matches for a regular expression against a set of
* items.
*/
@Component({
selector: 'regexMatchView',
template: `
<div class="regex-match-view-element">
<div ng-if="$ctrl.filterMatches($ctrl.regex, $ctrl.items, false) == null">
<i class="fa fa-exclamation-triangle"></i>Invalid Regular Expression!
</div>
<div ng-if="$ctrl.filterMatches($ctrl.regex, $ctrl.items, false) != null">
<table class="match-table">
<tr>
<td>Matching:</td>
<td>
<ul class="matching match-list">
<li ng-repeat="item in $ctrl.filterMatches($ctrl.regex, $ctrl.items, true)">
<i class="fa {{ item.icon }}"></i>{{ item.title }}
</li>
</ul>
</td>
</tr>
<tr>
<td>Not Matching:</td>
<td>
<ul class="not-matching match-list">
<li ng-repeat="item in $ctrl.filterMatches($ctrl.regex, $ctrl.items, false)">
<i class="fa {{ item.icon }}"></i>{{ item.title }}
</li>
</ul>
</td>
</tr>
</table>
</div>
</div>
`
templateUrl: '/static/js/directives/ui/regex-match-view/regex-match-view.component.html'
})
export class RegexMatchViewComponent implements ng.IComponentController {