Skip to content

Instantly share code, notes, and snippets.

<md-input-container class="admin-form">
<input md-input placeholder="Block Title" nfNoSpaces [(ngModel)]="block.title" id="block-{{ block.id }}-input-name" name="title"
#title="ngModel">
<md-hint [ngStyle]="{'color': 'red'}" align="start" *ngIf="!title.valid && !title.pristine">Title is required.</md-hint>
</md-input-container>
Be sure to include ref to directive in module declarations array.
function getVersion()
{
$tag = iex "git describe --long --tags --always"
$a = [regex]"v\d+\.\d+\.\d+\-\d+"
$b = $a.Match($tag)
$b = $b.Captures[0].value
$b = $b -replace '-', '.'
$b = $b -replace 'v', ''
Write-Host "Version found: $b"
class Timer {
readonly start = performance.now();
constructor(private readonly name: string) {}
stop() {
const time = performance.now() - this.start;
console.log('Timer:', this.name, 'finished in', Math.round(time), 'ms');
}
}