angular2-hostbinding Questions
5
Solved
Using @HostListener hook, but confirm dialog (that asks: Do you want to Leave this page? ...or Do you want to Reload this page?) is not showing.
The code works, but the confirm dialog is not showi...
Quickel asked 23/3, 2017 at 20:57
3
I have successfully used @HostBinding in my Angular 6 app to apply properties to the host component, as in applying a class when a variable is true:
@HostBinding('class.compact-ui') isCompact;
No...
Myrt asked 15/5, 2018 at 17:52
2
Solved
Do you guys know how I can batch inject style declarations in a component using the @HostBinding decorator?
What I am trying is:
@HostBinding('style')
get style(): CSSStyleDeclaration {
return {
...
Vue asked 11/9, 2017 at 7:57
3
Solved
I just try to make animation with angular 4 and I saw tutorial that use host in the component
import { Component, OnInit, HostBinding } from '@angular/core';
import { AngularFire, AuthProviders, A...
Blackandwhite asked 18/7, 2017 at 16:36
3
I have been trying to set animation param using @HostBinding decorative, but it seems not to work, what am I missing
animations: [
trigger('animateMe', [
state('void', style({ opacity: 0 })),
t...
Haloid asked 9/4, 2018 at 4:59
3
I'm trying to implement a custom directive in Angular 2 for moving an arbitrary HTML element around. So far everything is working except that I don't now how to get the initial position of the HTML...
Vassal asked 3/3, 2017 at 10:9
2
Question:
Is it possible to use @HostBinding in such a way to add, remove, or toggle classes on a host element and not remove preexisting classes, in particular when the classes need to be dynamic...
Renzo asked 29/11, 2017 at 2:47
2
Solved
Can't find documentation for it.
From examples I got 3 cases:
@HostBinding("attr.something")
@HostBinding("class.something")
@HostBinding("style.something")
but is there more?
Fantail asked 15/12, 2016 at 20:23
2
Solved
I'm trying to bind the CSS class foo to my host component, using @HostBinding depending on a test I do on a dynamic variable.
But can't manage to make it work properly.
Here's what I already tried...
Deepfry asked 5/7, 2017 at 10:23
2
Solved
I have created img-pop component which has @Input() bind property src.
I have created authSrc directive which has @HostBinding() property src.
@Component({
selector: 'img-pop',
template: `<img...
Sancha asked 15/5, 2017 at 14:19
1
© 2022 - 2024 — McMap. All rights reserved.