File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
projects/igniteui-angular/src/lib/carousel Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212 Output
1313} from '@angular/core' ;
1414import { IgxIconModule } from '../icon/index' ;
15- import { IBaseEventArgs } from '../core/utils' ;
15+ import { IBaseEventArgs , PlatformUtil } from '../core/utils' ;
1616
1717let NEXT_ID = 0 ;
1818
@@ -112,8 +112,10 @@ export class IgxCarouselComponent implements OnDestroy {
112112 * @memberof IgxCarouselComponent
113113 */
114114 set interval ( value : number ) {
115- this . _interval = + value ;
116- this . _restartInterval ( ) ;
115+ if ( this . _platformBrowser ) {
116+ this . _interval = + value ;
117+ this . _restartInterval ( ) ;
118+ }
117119 }
118120 /**
119121 * Returns the `tabIndex` of the carousel component.
@@ -201,8 +203,11 @@ export class IgxCarouselComponent implements OnDestroy {
201203 private _currentSlide : IgxSlideComponent ;
202204 private _destroyed : boolean ;
203205 private _total = 0 ;
206+ private _platformBrowser : boolean ;
204207
205- constructor ( private element : ElementRef ) { }
208+ constructor ( private element : ElementRef , private platformUtil : PlatformUtil ) {
209+ this . _platformBrowser = this . platformUtil . isBrowser ;
210+ }
206211 /**
207212 *@hidden
208213 */
You can’t perform that action at this time.
0 commit comments