!!str.trim()
./[^\s]/.test(str)
.идея была в том, чтобы поставить регулярное выражение в паттерн валидации ангуляр формы
[pattern]="'.*\\S.*'"
. <tr *ngFor="let monitoring of filteredMonitorings "> <td style="text-align: center">{{ getTotal(filteredMonitorings) }} </td> </tr>
<tr *ngFor="let monitoring of filteredMonitorings ">
<td style="text-align: center">{{ monitoring.count }} </td>
</tr>
<tr>
<td style="text-align: center">{{ getTotal(filteredMonitorings) }} </td>
</tr>
И еще почему всегда первый элемент в опций виден как undefined ?
И если убрать ng-model то 1-ая опций undefined не будет.
If the viewValue of ngModel does not match any of the options, then the control will automatically add an "unknown" option, which it then removes when the mismatch is resolved.
<div
*ngFor="let user of users"
[class]="active === user ? 'active' : ''"
(click)="active = user"
>
Делаю вроде все по документации ангулар!
import { Injectable } from '@angular/compiler/src/core';
import { Injectable } from '@angular/core';
this.renderer.createElement('svg');
this.renderer.createElement('svg', 'svg');
this.renderer.createElement('circle');
this.renderer.createElement('circle', 'svg');
Мне этот механизм не понятен.
Как это можно понять, это документированная возможность?
Есть ли причины так не делать?
Можно ли использовать `dashboard` селектор в `dashboard.scss`.
The :host
selector is the only way to target the host element. You can't reach the host element from inside the component with other selectors because it's not part of the component's own template. The host element is in a parent component's template.