File

src/module/component/mat-jumbotron/mat-jumbotron.component.ts

Metadata

encapsulation ViewEncapsulation.Emulated
selector mat-jumbotron
styleUrls mat-jumbotron.component.scss
templateUrl ./mat-jumbotron.component.html

Index

Properties
Inputs

Constructor

constructor()

Inputs

imgURL

Type: string

Properties

jumbotronContent
jumbotronContent: MatJumbotronContentComponent
Type : MatJumbotronContentComponent
Decorators : ContentChild
import {Component, ContentChild, Input, ViewEncapsulation} from '@angular/core';
import {MatJumbotronContentComponent} from './content/mat-jumbotron-content.component';

@Component({
  selector: 'mat-jumbotron',
  templateUrl: './mat-jumbotron.component.html',
  styleUrls: ['./mat-jumbotron.component.scss'],
  encapsulation: ViewEncapsulation.Emulated
})
export class MatJumbotronComponent {

  @ContentChild(MatJumbotronContentComponent)
  jumbotronContent: MatJumbotronContentComponent;

  @Input()
  imgURL: string;

  constructor() {
  }

}
<mat-card fxLayout="row" fxLayoutAlign="center center">

  <mat-card-content fxLayout="row"
                    fxFlex
                    fxLayout.xs="column"
                    fxLayoutGap="2rem"
                    fxLayoutAlign="center center">
    <!--main image-->
    <img *ngIf="imgURL"
         mat-card-xl-image
         [src]="imgURL">

    <!--content-->
    <div fxLayout="column" [fxFlex]="imgURL ? 50 : 100">
      <ng-container [ngTemplateOutlet]="jumbotronContent.content"></ng-container>
    </div>
  </mat-card-content>

</mat-card>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""