Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

create CSS class in directive angular

@Directive({
    selector: '[myHighlight]',
})
class MyDirective {
  @HostBinding('style.background-color')
  backgroundColor:string = 'yellow';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #CSS #class #directive #angular
ADD COMMENT
Topic
Name
5+2 =