File

src/components/weather-icon/weather-icon.component.ts

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector weather-icon
styles { }
template
<i *ngIf="iconClass" [class]="iconClass"></i>
<img *ngIf="iconImageUrl && !iconClass" [src]="iconImageUrl">

Inputs

iconClass

Type: string

iconImageUrl

Type: string

title

Type: string

import {
  Component,
  ChangeDetectionStrategy,
  Input,
  Output,
  EventEmitter
} from '@angular/core';

@Component({
  selector: 'weather-icon',
  changeDetection: ChangeDetectionStrategy.OnPush,
  styles: [``],
  template: `
    <i *ngIf="iconClass" [class]="iconClass"></i>
    <img *ngIf="iconImageUrl && !iconClass" [src]="iconImageUrl">
  `
})
export class WeatherIconComponent {
  @Input() iconClass: string;
  @Input() iconImageUrl: string;
  @Input() title: string;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""