Answers for "passing a variable to the width style div angular"

0

passing a variable to the width style div angular

<img [src]="imageUrl | safe: 'url'" [ngStyle]="{width: imagewidth, height: imageheight}">
Posted by: Guest on February-03-2021
0

passing a variable to the width style div angular

@Component({
  selector: '[sidebar]',
  templateUrl: 'app/Nav/sidebar.comp.html',
  host: {
    '[style.height.px]':'0.9 * height',
    '[style.width.px]':'0.21 * width'
  }

})

export class SidebarComp {
    width: number;
    height: number;

    constructor() {
        this.height = window.innerHeight;
        this.width = window.innerWidth;
    }
}
Posted by: Guest on February-03-2021

Code answers related to "passing a variable to the width style div angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language