1- import { Component , Directive , ElementRef , Inject , Injectable , HostBinding , HostListener , Input , OnInit , Renderer2 , ViewEncapsulation } from '@angular/core' ;
2- import { Replace } from './. ./shared' ;
1+ import { Component , Directive , ElementRef , HostBinding , HostListener , Input , OnInit , Renderer2 } from '@angular/core' ;
2+ import { Replace } from '../shared' ;
33
44@Directive ( {
55 selector : '[appNavDropdown]'
@@ -37,11 +37,11 @@ export class LinkAttributesDirective implements OnInit {
3737 constructor ( private renderer : Renderer2 , private el : ElementRef ) { }
3838
3939 ngOnInit ( ) {
40- const attribs = this . appLinkAttributes
41- for ( let attr in attribs ) {
42- if ( attr === 'style' && typeof ( attribs [ attr ] ) === 'object' ) {
40+ const attribs = this . appLinkAttributes ;
41+ for ( const attr in attribs ) {
42+ if ( attr === 'style' && typeof ( attribs [ attr ] ) === 'object' ) {
4343 this . setStyle ( attribs [ attr ] ) ;
44- } else if ( attr === 'class' ) {
44+ } else if ( attr === 'class' ) {
4545 this . addClass ( attribs [ attr ] ) ;
4646 } else {
4747 this . setAttrib ( attr , attribs [ attr ] ) ;
@@ -50,20 +50,20 @@ export class LinkAttributesDirective implements OnInit {
5050 }
5151
5252 private setStyle ( styles ) {
53- for ( let style in styles ) {
53+ for ( const style in styles ) {
5454 this . renderer . setStyle ( this . el . nativeElement , style , styles [ style ] ) ;
5555 }
5656 }
5757
5858 private addClass ( classes ) {
59- let classArray = Array . isArray ( classes ) ? classes : classes . split ( " " )
59+ const classArray = Array . isArray ( classes ) ? classes : classes . split ( ' ' ) ;
6060 classArray . forEach ( element => {
61- this . renderer . addClass ( this . el . nativeElement , element ) ;
61+ this . renderer . addClass ( this . el . nativeElement , element ) ;
6262 } ) ;
6363 }
6464
6565 private setAttrib ( key , value ) {
66- let newAttr = document . createAttribute ( key ) ;
66+ const newAttr = document . createAttribute ( key ) ;
6767 newAttr . value = value ;
6868 this . renderer . setAttribute ( this . el . nativeElement , key , value ) ;
6969 }
@@ -181,21 +181,21 @@ export class AppSidebarNavLinkComponent implements OnInit {
181181 @Input ( ) link : any ;
182182
183183 public getClasses ( ) {
184- const disabled = this . isDisabled ( )
184+ const disabled = this . isDisabled ( ) ;
185185 const classes = {
186186 'nav-link' : true ,
187187 'disabled' : disabled ,
188188 'btn-link' : disabled
189- }
189+ } ;
190190 if ( this . hasVariant ( ) ) {
191191 const variant = `nav-link-${ this . link . variant } ` ;
192- classes [ variant ] = true ;
192+ classes [ variant ] = true ;
193193 }
194- return classes
194+ return classes ;
195195 }
196196
197197 public getLinkType ( ) {
198- return this . isDisabled ( ) ? 'disabled' : this . isExternalLink ( ) ? 'external' : ''
198+ return this . isDisabled ( ) ? 'disabled' : this . isExternalLink ( ) ? 'external' : '' ;
199199 }
200200
201201 public hasVariant ( ) {
0 commit comments