File

src/module/directives/width/mat-width.directive.ts

Implements

OnInit

Metadata

Index

Methods
Inputs
HostBindings

Inputs

matMaxWidth

Type : string

matMinWidth

Type : string

matWidth

Type : string

HostBindings

style.max-width
style.max-width: string
Type : string
style.min-width
style.min-width: string
Type : string
style.width
style.width: string
Type : string

Methods

ngOnInit
ngOnInit()
Returns : void
import {Directive, HostBinding, Input, OnInit} from '@angular/core';

@Directive({
  selector: ''
    + '[matWidth],'
    + '[matMinWidth],'
    + '[matMaxWidth]'
})
export class MatWidthDirective implements OnInit {

  @Input()
  matWidth: string;

  @Input()
  matMinWidth: string;

  @Input()
  matMaxWidth: string;

  @HostBinding('style.width')
  width: string;

  @HostBinding('style.min-width')
  minWidth: string;

  @HostBinding('style.max-width')
  maxWidth: string;

  ngOnInit(): void {

    this.width = this.matWidth;
    this.minWidth = this.matMinWidth;
    this.maxWidth = this.matMaxWidth;

  }


}

result-matching ""

    No results matching ""