What does this line do? @Hostbinding(‘[class.valid]’) is valid?



What does this line do? @Hostbinding(‘[class.valid]’) is valid?..

Answer / Manindra Kumar

This line, in an Angular component, uses the @HostBinding decorator to bind a property of the component to a CSS class on its host element. If the expression inside the square brackets ([class.valid]) evaluates to true, the class 'valid' will be added to the host element.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Explain the differences between one-way binding and two-way binding.

1 Answers  


What is directive in angularjs?

1 Answers  


How to convert the input to lowercase or uppercase in angular 2?

1 Answers  


How to define multiple restrict options on a directive in angularjs?

1 Answers  


Is ngmodel deprecated?

1 Answers  


What is local reference in angular?

1 Answers  


Wht do we use directive?

1 Answers  


what is di (dependency injection) and how an object or function can get a hold of its dependencies?

1 Answers  


Is angular backward compatible?

1 Answers  


What is change detection strategy in angular?

1 Answers  


What is an isolated scope?

1 Answers  


What is dependency injection and how does it work?

1 Answers  


Categories