@@ -35,8 +35,8 @@ The **igx-nav-drawer** is a container element for side navigation, providing qui
| `isOpen` | boolean | State of the drawer. |
| `pin` | boolean | Pinned state of the drawer. Currently only support. |
| `pinThreshold` | number | Minimum device width required for automatic pin to be toggled. Default is 1024, can be set to falsy value to ignore. |
-| `width` | string| Width of the drawer in its open state. Defaults to 300px based on the `.ig-nav-drawer` style. Can be used to override or dynamically modify the width.|
-| `miniWidth` | string | Width of the drawer in its mini state. Defaults to 60px based on the `.ig-nav-drawer.mini` style. Can be used to override or dynamically modify the width. |
+| `width` | string| Width of the drawer in its open state. Defaults to 300px based on the `.igx-nav-drawer` style. Can be used to override or dynamically modify the width.|
+| `miniWidth` | string | Width of the drawer in its mini state. Defaults to 60px based on the `.igx-nav-drawer.mini` style. Can be used to override or dynamically modify the width. |
## Methods
| Name | Description |
@@ -66,7 +66,7 @@ export class MainDrawerSampleComponent {
open: boolean = false;
position = "left";
drawerMiniWidth = "";
- @ViewChild(IgxNavigationDrawer) viewChild: IgxNavigationDrawer;
+ @ViewChild(IgxNavigationDrawerComponent) viewChild: IgxNavigationDrawerComponent;
/** Sample-specific configurations: */
showMiniWidth: boolean = false;
showEventLog: boolean = true;
diff --git a/src/navigation-drawer/navigation-drawer.component.html b/src/navigation-drawer/navigation-drawer.component.html
index 2ee431be5bf..a99cd176296 100644
--- a/src/navigation-drawer/navigation-drawer.component.html
+++ b/src/navigation-drawer/navigation-drawer.component.html
@@ -1,12 +1,12 @@
-
-
+
\ No newline at end of file
diff --git a/src/navigation-drawer/navigation-drawer.component.scss b/src/navigation-drawer/navigation-drawer.component.scss
index d7aadb1c521..6abc636a08f 100644
--- a/src/navigation-drawer/navigation-drawer.component.scss
+++ b/src/navigation-drawer/navigation-drawer.component.scss
@@ -2,7 +2,7 @@
@import "../themes/material/config";
// Main Navigation Drawer state styles
-@include b(ig-nav-drawer) {
+@include b(igx-nav-drawer) {
position: fixed;
width: em(242px);
height: 100%;
@@ -71,7 +71,7 @@
}
// Navigation Drawer overlay styles
-.ig-nav-drawer-overlay {
+.igx-nav-drawer-overlay {
opacity: 1;
background-color: $overlay-color;
transition-property: opacity, visibility; // opacity must match drawer transition, step over visibility to reduce animation cost
diff --git a/src/navigation-drawer/navigation-drawer.component.spec.ts b/src/navigation-drawer/navigation-drawer.component.spec.ts
index bbbc1a62d0a..4309f2f479e 100644
--- a/src/navigation-drawer/navigation-drawer.component.spec.ts
+++ b/src/navigation-drawer/navigation-drawer.component.spec.ts
@@ -7,7 +7,7 @@ import {
} from "@angular/core/testing";
import { Component, DebugElement, ViewChild } from "@angular/core";
-import { Observable } from "rxjs/Rx";
+import { Observable } from "rxjs/Observable";
import * as Infragistics from "../../src/main";
// HammerJS simulator from https://github.com/hammerjs/simulator, manual typings TODO
@@ -19,10 +19,10 @@ describe("Navigation Drawer", () => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
TestBed.configureTestingModule({
declarations: [
- Infragistics.IgxNavigationClose,
- Infragistics.IgxNavigationToggle,
+ Infragistics.IgxNavigationCloseDirective,
+ Infragistics.IgxNavigationToggleDirective,
TestComponent,
- TestComponentDI,
+ TestComponentDIComponent,
TestComponentPin],
imports: [Infragistics.IgxNavigationDrawerModule]
});
@@ -36,18 +36,20 @@ describe("Navigation Drawer", () => {
TestBed.compileComponents().then(() => {
const fixture = TestBed.createComponent(TestComponent);
fixture.detectChanges();
- expect(fixture.componentInstance.viewChild instanceof Infragistics.IgxNavigationDrawer).toBeTruthy();
+ expect(fixture.componentInstance.viewChild instanceof
+ Infragistics.IgxNavigationDrawerComponent).toBeTruthy();
expect(fixture.componentInstance.viewChild.state).toBeNull();
});
}));
it("should initialize with DI service", async(() => {
TestBed.compileComponents().then(() => {
- const fixture = TestBed.createComponent(TestComponentDI);
+ const fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
expect(fixture.componentInstance.viewChild).toBeDefined();
- expect(fixture.componentInstance.viewChild instanceof Infragistics.IgxNavigationDrawer).toBeTruthy();
+ expect(fixture.componentInstance.viewChild instanceof
+ Infragistics.IgxNavigationDrawerComponent).toBeTruthy();
expect(fixture.componentInstance.viewChild.state instanceof Infragistics.IgxNavigationService)
.toBeTruthy();
});
@@ -55,11 +57,11 @@ describe("Navigation Drawer", () => {
it("should properly initialize all elements and properties", async(() => {
TestBed.compileComponents().then(() => {
- const fixture = TestBed.createComponent(TestComponentDI);
+ const fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
- expect(fixture.componentInstance.viewChild.drawer.classList).toContain("ig-nav-drawer");
- expect(fixture.componentInstance.viewChild.overlay.classList).toContain("ig-nav-drawer-overlay");
+ expect(fixture.componentInstance.viewChild.drawer.classList).toContain("igx-nav-drawer");
+ expect(fixture.componentInstance.viewChild.overlay.classList).toContain("igx-nav-drawer-overlay");
expect(fixture.componentInstance.viewChild.styleDummy.classList).toContain("style-dummy");
expect(fixture.componentInstance.viewChild.hasAnimateWidth).toBeFalsy();
@@ -69,14 +71,14 @@ describe("Navigation Drawer", () => {
}));
it("should attach events and register to nav service and detach on destroy", async(() => {
- const template = '';
- TestBed.overrideComponent(TestComponentDI, {
+ const template = "";
+ TestBed.overrideComponent(TestComponentDIComponent, {
set: {
template
}});
// compile after overrides, not in before each: https://github.com/angular/angular/issues/10712
TestBed.compileComponents().then(() => {
- const fixture = TestBed.createComponent(TestComponentDI);
+ const fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
const state: Infragistics.IgxNavigationService = fixture.componentInstance.viewChild.state;
const touchManager = fixture.componentInstance.viewChild.touchManager;
@@ -95,9 +97,9 @@ describe("Navigation Drawer", () => {
it("should open and close with API calls", async(() => {
TestBed.compileComponents().then(() => {
- const fixture = TestBed.createComponent(TestComponentDI);
+ const fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
- const drawer: Infragistics.IgxNavigationDrawer = fixture.componentInstance.viewChild;
+ const drawer: Infragistics.IgxNavigationDrawerComponent = fixture.componentInstance.viewChild;
expect(drawer.isOpen).toBeFalsy();
drawer.open();
@@ -121,7 +123,7 @@ describe("Navigation Drawer", () => {
}));
it("async API calls should resolve Promise and emit events", async(() => {
- let fixture: ComponentFixture;
+ let fixture: ComponentFixture;
let resolver;
let drawer;
const result = new Promise((resolve) => {
@@ -131,7 +133,7 @@ describe("Navigation Drawer", () => {
});
// compile after overrides, not in before each: https://github.com/angular/angular/issues/10712
TestBed.compileComponents().then(() => {
- fixture = TestBed.createComponent(TestComponentDI);
+ fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
drawer = fixture.componentInstance.viewChild;
@@ -170,16 +172,16 @@ describe("Navigation Drawer", () => {
it("should properly initialize with min template", async(() => {
const template = `
-
-
+
+
`;
- TestBed.overrideComponent(TestComponentDI, {
+ TestBed.overrideComponent(TestComponentDIComponent, {
set: {
template
}});
// compile after overrides, not in before each: https://github.com/angular/angular/issues/10712
TestBed.compileComponents().then(() => {
- const fixture = TestBed.createComponent(TestComponentDI);
+ const fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
expect(fixture.componentInstance.viewChild.hasAnimateWidth).toBeTruthy();
@@ -218,10 +220,10 @@ describe("Navigation Drawer", () => {
}));
it("should toggle on edge swipe gesture", (done) => {
- let fixture: ComponentFixture;
+ let fixture: ComponentFixture;
TestBed.compileComponents().then(() => {
- fixture = TestBed.createComponent(TestComponentDI);
+ fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
expect(fixture.componentInstance.viewChild.isOpen).toEqual(false);
@@ -248,11 +250,11 @@ describe("Navigation Drawer", () => {
it("should toggle on edge pan gesture", (done) => {
let navDrawer;
- let fixture: ComponentFixture;
+ let fixture: ComponentFixture;
// Using bare minimum of timeouts, jasmine.DEFAULT_TIMEOUT_INTERVAL can be modified only in beforeEach
TestBed.compileComponents().then(() => {
- fixture = TestBed.createComponent(TestComponentDI);
+ fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
navDrawer = fixture.componentInstance.viewChild;
@@ -290,18 +292,18 @@ describe("Navigation Drawer", () => {
it("should update edge zone with mini width", async(() => {
const template = `
-
+
`;
- let fixture: ComponentFixture;
- TestBed.overrideComponent(TestComponentDI, {
+ let fixture: ComponentFixture;
+ TestBed.overrideComponent(TestComponentDIComponent, {
set: {
template
}});
// compile after overrides, not in before each: https://github.com/angular/angular/issues/10712
TestBed.compileComponents().then(() => {
- fixture = TestBed.createComponent(TestComponentDI);
+ fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
- const drawer: Infragistics.IgxNavigationDrawer = fixture.componentInstance.viewChild;
+ const drawer: Infragistics.IgxNavigationDrawerComponent = fixture.componentInstance.viewChild;
fixture.componentInstance.drawerMiniWidth = 60;
fixture.detectChanges();
@@ -319,17 +321,17 @@ describe("Navigation Drawer", () => {
it("should update width from css or property", (done) => {
const template = `
-
-
+
+
`;
- let fixture: ComponentFixture;
- TestBed.overrideComponent(TestComponentDI, {
+ let fixture: ComponentFixture;
+ TestBed.overrideComponent(TestComponentDIComponent, {
set: {
template
}});
// compile after overrides, not in before each: https://github.com/angular/angular/issues/10712
TestBed.compileComponents().then(() => {
- fixture = TestBed.createComponent(TestComponentDI);
+ fixture = TestBed.createComponent(TestComponentDIComponent);
fixture.detectChanges();
// defaults:
@@ -449,26 +451,26 @@ describe("Navigation Drawer", () => {
});
@Component({
- selector: "test-cmp",
+ selector: "igx-test-cmp",
template: ""
})
class TestComponent {
- @ViewChild(Infragistics.IgxNavigationDrawer) public viewChild: Infragistics.IgxNavigationDrawer;
+ @ViewChild(Infragistics.IgxNavigationDrawerComponent) public viewChild: Infragistics.IgxNavigationDrawerComponent;
}
@Component({
providers: [Infragistics.IgxNavigationService],
- selector: "test-cmp",
+ selector: "igx-test-cmp",
template: ""
})
-class TestComponentDI {
+class TestComponentDIComponent {
public drawerMiniWidth: string | number;
public drawerWidth: string | number;
- @ViewChild(Infragistics.IgxNavigationDrawer) public viewChild: Infragistics.IgxNavigationDrawer;
+ @ViewChild(Infragistics.IgxNavigationDrawerComponent) public viewChild: Infragistics.IgxNavigationDrawerComponent;
}
-class TestComponentPin extends TestComponentDI {
- public pin: boolean = true;
- public enableGestures: string = "";
- public pinThreshold: number = 1024;
+class TestComponentPin extends TestComponentDIComponent {
+ public pin = true;
+ public enableGestures = "";
+ public pinThreshold = 1024;
}
diff --git a/src/navigation-drawer/navigation-drawer.component.ts b/src/navigation-drawer/navigation-drawer.component.ts
index 4dd36335267..c9664fd56e2 100644
--- a/src/navigation-drawer/navigation-drawer.component.ts
+++ b/src/navigation-drawer/navigation-drawer.component.ts
@@ -28,12 +28,12 @@ import { HammerGesturesManager } from "../core/touch";
* Usage:
* ```
*
- *
+ *
*
*
*
* ```
- * Can also include an optional `
`.
+ * Can also include an optional `
`.
* ID required to register with NavigationService allow directives to target the control.
*/
@Component({
@@ -42,7 +42,7 @@ import { HammerGesturesManager } from "../core/touch";
styleUrls: ["./navigation-drawer.component.scss"],
templateUrl: "navigation-drawer.component.html"
})
-export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
+export class IgxNavigationDrawerComponent extends BaseComponent implements IToggleView,
OnInit,
AfterContentInit,
OnDestroy,
@@ -54,34 +54,34 @@ export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
/**
* Position of the Navigation Drawer. Can be "left"(default) or "right". Only has effect when not pinned.
*/
- @Input() public position: string = "left";
+ @Input() public position = "left";
/**
* Enables the use of touch gestures to manipulate the drawer - such as swipe/pan from edge to open,
* swipe toggle and pan drag.
*/
- @Input() public enableGestures: boolean = true;
+ @Input() public enableGestures = true;
/** State of the drawer. */
- @Input() public isOpen: boolean = false;
+ @Input() public isOpen = false;
/** Pinned state of the drawer. Currently only support */
- @Input() public pin: boolean = false;
+ @Input() public pin = false;
/**
* Minimum device width required for automatic pin to be toggled.
* Deafult is 1024, can be set to falsy value to ignore.
*/
- @Input() public pinThreshold: number = 1024;
+ @Input() public pinThreshold = 1024;
/**
- * Width of the drawer in its open state. Defaults to 300px based on the `.ig-nav-drawer` style.
+ * Width of the drawer in its open state. Defaults to 300px based on the `.igx-nav-drawer` style.
* Can be used to override or dynamically modify the width.
*/
@Input() public width: string;
/**
- * Width of the drawer in its mini state. Defaults to 60px based on the `.ig-nav-drawer.mini` style.
+ * Width of the drawer in its mini state. Defaults to 60px based on the `.igx-nav-drawer.mini` style.
* Can be used to override or dynamically modify the width.
*/
@Input() public miniWidth: string;
@@ -97,15 +97,15 @@ export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
/** Event fired when the Navigation Drawer has closed. */
@Output() public closed = new EventEmitter();
- public _hasMimiTempl: boolean = false;
- private _gesturesAttached: boolean = false;
+ public _hasMimiTempl = false;
+ private _gesturesAttached = false;
private _widthCache: { width: number, miniWidth: number } = { width: null, miniWidth: null };
private _resizeObserver: Subscription;
private css: { [name: string]: string; } = {
- drawer: "ig-nav-drawer",
+ drawer: "igx-nav-drawer",
mini: "mini",
- miniProjection: ".ig-drawer-mini-content",
- overlay: "ig-nav-drawer-overlay",
+ miniProjection: ".igx-drawer-mini-content",
+ overlay: "igx-nav-drawer-overlay",
styleDummy: "style-dummy"
};
private _resolveOpen: (value?: any | PromiseLike) => void;
@@ -135,7 +135,7 @@ export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
}
/** Pan animation properties */
- private _panning: boolean = false;
+ private _panning = false;
private _panStartWidth: number;
private _panLimit: number;
private _previousDeltaX: number;
@@ -147,7 +147,7 @@ export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
return this.pin || this._hasMimiTempl;
}
- private _maxEdgeZone: number = 50;
+ private _maxEdgeZone = 50;
/**
* Used for touch gestures (swipe and pan).
* Defaults to 50 (in px) and is extended to at least 110% of the mini template width if available.
@@ -609,8 +609,8 @@ export class IgxNavigationDrawer extends BaseComponent implements IToggleView,
}
@NgModule({
- declarations: [IgxNavigationDrawer],
- exports: [IgxNavigationDrawer]
+ declarations: [IgxNavigationDrawerComponent],
+ exports: [IgxNavigationDrawerComponent]
})
export class IgxNavigationDrawerModule {
}
diff --git a/src/progressbar/circularbar.component.spec.ts b/src/progressbar/circularbar.component.spec.ts
index 552b2430c76..a8a33c846e6 100644
--- a/src/progressbar/circularbar.component.spec.ts
+++ b/src/progressbar/circularbar.component.spec.ts
@@ -6,23 +6,23 @@ import {
tick
} from "@angular/core/testing";
import { By } from "@angular/platform-browser";
-import { IgxCircularProgressBar } from "./progressbar.component";
+import { IgxCircularProgressBarComponent } from "./progressbar.component";
describe("IgCircularBar", () => {
const tickTime = 2000;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
- InitCircularProgressBar,
- CircularBar,
- IgxCircularProgressBar
+ InitCircularProgressBarComponent,
+ CircularBarComponent,
+ IgxCircularProgressBarComponent
]
})
.compileComponents();
}));
it("Initialize circularProgressbar with default values", fakeAsync(() => {
- const fixture = TestBed.createComponent(InitCircularProgressBar);
+ const fixture = TestBed.createComponent(InitCircularProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -40,7 +40,7 @@ describe("IgCircularBar", () => {
it("should set value to 0 for negative numbers", fakeAsync(() => {
const negativeValue = -20;
const expectedValue = 0;
- const fixture = TestBed.createComponent(InitCircularProgressBar);
+ const fixture = TestBed.createComponent(InitCircularProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
tick(tickTime);
@@ -58,7 +58,7 @@ describe("IgCircularBar", () => {
it("If passed value is higher then max it should stay equal to maximum (default max size)", fakeAsync(() => {
const progressBarValue = 120;
const expectedMaxValue = 100;
- const fixture = TestBed.createComponent(InitCircularProgressBar);
+ const fixture = TestBed.createComponent(InitCircularProgressBarComponent);
fixture.componentInstance.circularBar.value = 11;
tick(tickTime);
fixture.detectChanges();
@@ -77,7 +77,7 @@ describe("IgCircularBar", () => {
it("If passed value is higher then max it should stay equal to maximum (custom max size)", fakeAsync(() => {
const progressBarMaxValue = 150;
const progressBarValue = 170;
- const fixture = TestBed.createComponent(InitCircularProgressBar);
+ const fixture = TestBed.createComponent(InitCircularProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
tick(tickTime);
@@ -96,7 +96,7 @@ describe("IgCircularBar", () => {
it("should not update value if max is updated", fakeAsync(() => {
let progressBarMaxValue = 150;
const progressBarValue = 120;
- const fixture = TestBed.createComponent(InitCircularProgressBar);
+ const fixture = TestBed.createComponent(InitCircularProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -123,7 +123,7 @@ describe("IgCircularBar", () => {
}));
it("Should update value when we try to decrease it", fakeAsync(() => {
- const fixture = TestBed.createComponent(CircularBar);
+ const fixture = TestBed.createComponent(CircularBarComponent);
const progressBar = fixture.componentInstance.circularBar;
let expectedValue = 50;
@@ -146,7 +146,7 @@ describe("IgCircularBar", () => {
}));
it("Should update value when we try to decrease it (without animation)", fakeAsync(() => {
- const fixture = TestBed.createComponent(CircularBar);
+ const fixture = TestBed.createComponent(CircularBarComponent);
const progressBar = fixture.componentInstance.circularBar;
let expectedValue = 50;
@@ -166,7 +166,7 @@ describe("IgCircularBar", () => {
// UI TESTS
it("The value representation should respond to passed value correctly", fakeAsync(() => {
- const fixture = TestBed.createComponent(CircularBar);
+ const fixture = TestBed.createComponent(CircularBarComponent);
const expectedValue = 30;
@@ -189,7 +189,7 @@ describe("IgCircularBar", () => {
}));
it("The max representation should respond correctly to passed maximum value", fakeAsync(() => {
- const fixture = TestBed.createComponent(CircularBar);
+ const fixture = TestBed.createComponent(CircularBarComponent);
const expectedValue = 30;
@@ -219,8 +219,8 @@ describe("IgCircularBar", () => {
});
@Component({ template: `` })
-class InitCircularProgressBar {
- @ViewChild(IgxCircularProgressBar) public circularBar: IgxCircularProgressBar;
+class InitCircularProgressBarComponent {
+ @ViewChild(IgxCircularProgressBarComponent) public circularBar: IgxCircularProgressBarComponent;
}
@Component({ template: `
@@ -229,12 +229,12 @@ class InitCircularProgressBar {
`
})
-class CircularBar {
- @ViewChild(IgxCircularProgressBar) public progressbar: IgxCircularProgressBar;
+class CircularBarComponent {
+ @ViewChild(IgxCircularProgressBarComponent) public progressbar: IgxCircularProgressBarComponent;
@ViewChild("wrapper") public wrapper;
@ViewChild("circularBar") public circularBar;
- public value: number = 30;
- public max: number = 100;
- public animate: boolean = true;
+ public value = 30;
+ public max = 100;
+ public animate = true;
}
diff --git a/src/progressbar/linearbar.component.spec.ts b/src/progressbar/linearbar.component.spec.ts
index 8c78610e693..dc6e291b7dc 100644
--- a/src/progressbar/linearbar.component.spec.ts
+++ b/src/progressbar/linearbar.component.spec.ts
@@ -6,23 +6,23 @@ import {
tick
} from "@angular/core/testing";
import { By } from "@angular/platform-browser";
-import { IgxLinearProgressBar } from "./progressbar.component";
+import { IgxLinearProgressBarComponent } from "./progressbar.component";
describe("IgLinearBar", () => {
const tickTime = 2000;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
- InitLinearProgressBar,
- LinearBar,
- IgxLinearProgressBar
+ InitLinearProgressBarComponent,
+ LinearBarComponent,
+ IgxLinearProgressBarComponent
]
})
.compileComponents();
}));
it("should initialize linearProgressbar with default values", fakeAsync(() => {
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -44,7 +44,7 @@ describe("IgLinearBar", () => {
it("should set value to 0 for negative values", fakeAsync(() => {
const negativeValue = -20;
const expectedValue = 0;
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -63,7 +63,7 @@ describe("IgLinearBar", () => {
it("If passed value is higher then max it should stay equal to maximum (default max size)", fakeAsync(() => {
const progressBarValue = 120;
const expectedMaxValue = 100;
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -83,7 +83,7 @@ describe("IgLinearBar", () => {
"(custom max size and without animation)", fakeAsync(() => {
const progressBarMaxValue = 150;
const progressBarValue = 170;
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
fixture.detectChanges();
@@ -100,7 +100,7 @@ describe("IgLinearBar", () => {
it("should not update value if max is decreased", fakeAsync(() => {
let progressBarMaxValue = 200;
const progressBarValue = 80;
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
tick(tickTime);
fixture.detectChanges();
@@ -129,7 +129,7 @@ describe("IgLinearBar", () => {
it("should not update value if max is increased (without animation)", fakeAsync(() => {
let progressBarMaxValue = 100;
const progressBarValue = 50;
- const fixture = TestBed.createComponent(InitLinearProgressBar);
+ const fixture = TestBed.createComponent(InitLinearProgressBarComponent);
fixture.detectChanges();
@@ -151,7 +151,7 @@ describe("IgLinearBar", () => {
}));
it("Should update value when we try to decrese it", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
const progressBar = fixture.componentInstance.linearBar;
let expectedValue = 50;
@@ -174,7 +174,7 @@ describe("IgLinearBar", () => {
}));
it("Should update value when we try to decrease it (without animation)", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
const progressBar = fixture.componentInstance.linearBar;
let expectedValue = 50;
@@ -195,7 +195,7 @@ describe("IgLinearBar", () => {
// UI Tests
it("The percentage representation should respond to passed value correctly", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
const expectedValue = 30;
@@ -206,7 +206,7 @@ describe("IgLinearBar", () => {
tick(tickTime);
const progressBarElem = fixture.componentInstance.linearBar.elementRef.nativeElement
- .querySelectorAll('[class*="progress-linear__bar--"]')[0];
+ .querySelectorAll("[class*='progress-linear__bar--']")[0];
fixture.detectChanges();
@@ -215,11 +215,11 @@ describe("IgLinearBar", () => {
}));
it("Should change class suffix which would be relevant to the type that had been passed", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
fixture.detectChanges();
const progressBarElem = fixture.componentInstance.linearBar.elementRef.nativeElement
- .querySelectorAll('[class*="progress-linear__bar--"]')[0];
+ .querySelectorAll("[class*='progress-linear__bar--']")[0];
expect(progressBarElem.classList.contains("progress-linear__bar--default")).toBeTruthy();
@@ -230,7 +230,7 @@ describe("IgLinearBar", () => {
}));
it("Change progressbar style to be striped", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
fixture.detectChanges();
const progressElem = fixture.componentInstance.linearBar.elementRef.nativeElement
@@ -245,13 +245,13 @@ describe("IgLinearBar", () => {
}));
it("should stay striped when the type has changed", fakeAsync(() => {
- const fixture = TestBed.createComponent(LinearBar);
+ const fixture = TestBed.createComponent(LinearBarComponent);
fixture.detectChanges();
const progressElem = fixture.componentInstance.linearBar.elementRef.nativeElement
.getElementsByClassName("progress-linear")[0];
const progressBarElem = fixture.componentInstance.linearBar.elementRef.nativeElement
- .querySelectorAll('[class*="progress-linear__bar--"]')[0];
+ .querySelectorAll("[class*='progress-linear__bar--']")[0];
fixture.componentInstance.striped = true;
fixture.detectChanges();
@@ -268,8 +268,8 @@ describe("IgLinearBar", () => {
});
@Component({ template: `` })
-class InitLinearProgressBar {
- @ViewChild(IgxLinearProgressBar) public linearBar: IgxLinearProgressBar;
+class InitLinearProgressBarComponent {
+ @ViewChild(IgxLinearProgressBarComponent) public linearBar: IgxLinearProgressBarComponent;
}
@Component({ template: `
@@ -277,14 +277,14 @@ class InitLinearProgressBar {
[animate]="animate" [type]="type" [striped]="striped">
` })
-class LinearBar {
- @ViewChild(IgxLinearProgressBar) public progressbar: IgxLinearProgressBar;
+class LinearBarComponent {
+ @ViewChild(IgxLinearProgressBarComponent) public progressbar: IgxLinearProgressBarComponent;
@ViewChild("wrapper") public wrapper;
@ViewChild("linearBar") public linearBar;
- public value: number = 30;
- public max: number = 100;
- public type: string = "default";
- public striped: boolean = false;
- public animate: boolean = true;
+ public value = 30;
+ public max = 100;
+ public type = "default";
+ public striped = false;
+ public animate = true;
}
diff --git a/src/progressbar/progressbar.component.ts b/src/progressbar/progressbar.component.ts
index b068ce20eec..285f2958c1d 100644
--- a/src/progressbar/progressbar.component.ts
+++ b/src/progressbar/progressbar.component.ts
@@ -15,8 +15,8 @@ import {
export abstract class BaseProgress {
protected requestAnimationId: number = undefined;
- protected _valueInPercent: number = 0;
- protected _max: number = 100;
+ protected _valueInPercent = 0;
+ protected _max = 100;
protected _value = 0;
protected _animate = true;
@@ -71,10 +71,10 @@ export abstract class BaseProgress {
styleUrls: ["progressbar.component.scss"],
templateUrl: "templates/linear-bar.component.html"
})
-export class IgxLinearProgressBar extends BaseProgress {
+export class IgxLinearProgressBarComponent extends BaseProgress {
- @Input() public striped: boolean = false;
- @Input() public type: string = "default";
+ @Input() public striped = false;
+ @Input() public type = "default";
@Input()
set animate(animate: boolean) {
this._animate = animate;
@@ -130,7 +130,7 @@ export class IgxLinearProgressBar extends BaseProgress {
styleUrls: ["progressbar.component.scss"],
templateUrl: "templates/circular-bar.component.html"
})
-export class IgxCircularProgressBar extends BaseProgress implements AfterViewInit {
+export class IgxCircularProgressBarComponent extends BaseProgress implements AfterViewInit {
@Output() public onProgressChanged = new EventEmitter();
@@ -180,7 +180,7 @@ export class IgxCircularProgressBar extends BaseProgress implements AfterViewIni
this.onProgressChanged.emit(changedValues);
}
- private _radius: number = 0;
+ private _radius = 0;
private _circumference: number;
@ViewChild("circle") private _svgCircle: ElementRef;
@@ -240,8 +240,8 @@ export function convertInPercentage(value: number, max: number) {
}
@NgModule({
- declarations: [IgxLinearProgressBar, IgxCircularProgressBar],
- exports: [IgxLinearProgressBar, IgxCircularProgressBar],
+ declarations: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent],
+ exports: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent],
imports: [CommonModule]
})
export class IgxProgressBarModule {
diff --git a/src/radio/radio.component.spec.ts b/src/radio/radio.component.spec.ts
index 87151db2044..394f431e592 100644
--- a/src/radio/radio.component.spec.ts
+++ b/src/radio/radio.component.spec.ts
@@ -5,16 +5,16 @@ import {
} from "@angular/core/testing";
import { FormsModule } from "@angular/forms";
import { By } from "@angular/platform-browser";
-import { IgxRadio } from "./radio.component";
+import { IgxRadioComponent } from "./radio.component";
describe("IgRadio", () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
- InitRadio,
- RadioWithModel,
- IgxRadio
+ InitRadioComponent,
+ RadioWithModelComponent,
+ IgxRadioComponent
],
imports: [FormsModule]
})
@@ -22,7 +22,7 @@ describe("IgRadio", () => {
}));
it("Init a radio", () => {
- const fixture = TestBed.createComponent(InitRadio);
+ const fixture = TestBed.createComponent(InitRadioComponent);
fixture.detectChanges();
const nativeRadio = fixture.debugElement.query(By.css("input")).nativeElement;
@@ -35,7 +35,7 @@ describe("IgRadio", () => {
});
it("Binding to ngModel", async(() => {
- const fixture = TestBed.createComponent(RadioWithModel);
+ const fixture = TestBed.createComponent(RadioWithModelComponent);
fixture.detectChanges();
const radios = fixture.componentInstance.radios.toArray();
@@ -59,7 +59,7 @@ describe("IgRadio", () => {
});
@Component({ template: `Radio` })
-class InitRadio {}
+class InitRadioComponent {}
@Component({
template: `
@@ -67,8 +67,8 @@ class InitRadio {}
value="{{item}}"
name="group" [(ngModel)]="selected">{{item}}`
})
-class RadioWithModel {
- @ViewChildren(IgxRadio) public radios;
+class RadioWithModelComponent {
+ @ViewChildren(IgxRadioComponent) public radios;
public selected = "Foo";
}
diff --git a/src/radio/radio.component.ts b/src/radio/radio.component.ts
index 637eaf3a7f3..d8829e7c15d 100644
--- a/src/radio/radio.component.ts
+++ b/src/radio/radio.component.ts
@@ -14,16 +14,16 @@ let nextId = 0;
const noop = () => { };
@Component({
- providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxRadio, multi: true }],
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxRadioComponent, multi: true }],
selector: "igx-radio",
styleUrls: ["./radio.component.scss"],
templateUrl: "radio.component.html"
})
-export class IgxRadio implements ControlValueAccessor {
+export class IgxRadioComponent implements ControlValueAccessor {
@Input() public value: any;
- @Input() public id: string = `igx-radio-${nextId++}`;
+ @Input() public id = `igx-radio-${nextId++}`;
@Input() public name: string;
@@ -81,7 +81,7 @@ export class IgxRadio implements ControlValueAccessor {
}
@NgModule({
- declarations: [IgxRadio],
- exports: [IgxRadio]
+ declarations: [IgxRadioComponent],
+ exports: [IgxRadioComponent]
})
export class IgxRadioModule { }
diff --git a/src/scroll/README.md b/src/scroll/README.md
index e95e42b0d17..b28ac261b31 100644
--- a/src/scroll/README.md
+++ b/src/scroll/README.md
@@ -47,7 +47,7 @@ export class IgxScrollSampleComponent {
To use the IgxSlider import the IgxSlider:
```typescript
-import { IgxScroll } from "../../../src/main";
+import { IgxScrollComponent } from "../../../src/main";
```
## API
diff --git a/src/scroll/scroll.component.spec.ts b/src/scroll/scroll.component.spec.ts
index 425e8057d21..54acc07e5a5 100644
--- a/src/scroll/scroll.component.spec.ts
+++ b/src/scroll/scroll.component.spec.ts
@@ -1,6 +1,6 @@
import {Component, ViewChild} from "@angular/core";
import {async, TestBed} from "@angular/core/testing";
-import {IgxScroll, IgxScrollEvent, IgxScrollModule} from "./scroll.component";
+import {IgxScrollComponent, IgxScrollEvent, IgxScrollModule} from "./scroll.component";
declare var Simulator: any;
@@ -262,7 +262,6 @@ describe("IgxScroll", () => {
}
});
@Component({
- selector: "scroll-test-component",
template: `
{
`
})
class ScrollInitializeTestComponent {
- @ViewChild(IgxScroll) public scroll: IgxScroll;
+ @ViewChild(IgxScrollComponent) public scroll: IgxScrollComponent;
public items: string[] = [];
public visibleItems: string[] = [];
- public visibleItemsCount: number = 5;
+ public visibleItemsCount = 5;
- public currentTop: number = 0;
+ public currentTop = 0;
public constructor() {
for (let i = 1; i <= 5000; i++) {
diff --git a/src/scroll/scroll.component.ts b/src/scroll/scroll.component.ts
index d75ed0a738e..a4b6df07519 100644
--- a/src/scroll/scroll.component.ts
+++ b/src/scroll/scroll.component.ts
@@ -27,7 +27,7 @@ export interface IgxScrollEvent {
styleUrls: ["./scroll.component.scss"],
templateUrl: "scroll.component.html"
})
-export class IgxScroll {
+export class IgxScrollComponent {
/**
* Gets the scroll top of the scroll
* @returns {number}
@@ -139,8 +139,8 @@ export class IgxScroll {
}
@NgModule({
- declarations: [IgxScroll],
- exports: [IgxScroll],
+ declarations: [IgxScrollComponent],
+ exports: [IgxScrollComponent],
imports: [CommonModule],
providers: [{
provide: HAMMER_GESTURE_CONFIG,
diff --git a/src/slider/README.md b/src/slider/README.md
index 8b97668f58d..577ea305e20 100644
--- a/src/slider/README.md
+++ b/src/slider/README.md
@@ -26,10 +26,10 @@ Based on its configuration it's a slider or range slider.
### Dependencies
-To use the IgxSlider import the IgxSlider:
+To use the IgxSlider import the IgxSliderComponent:
```typescript
-import { IgxSlider } from "../../../src/main";
+import { IgxSliderComponent } from "../../../src/main";
```
## API
diff --git a/src/slider/slider.component.spec.ts b/src/slider/slider.component.spec.ts
index 73deecba436..41e810521eb 100644
--- a/src/slider/slider.component.spec.ts
+++ b/src/slider/slider.component.spec.ts
@@ -1,6 +1,6 @@
import { Component, ViewChild } from "@angular/core";
import { async, TestBed } from "@angular/core/testing";
-import {IgxSlider, IgxSliderModule, IRangeSliderValue, SliderType} from "./slider.component";
+import {IgxSliderComponent, IgxSliderModule, IRangeSliderValue, SliderType} from "./slider.component";
declare var Simulator: any;
@@ -303,7 +303,7 @@ describe("IgxSlider", () => {
xit("should move thumb slider to value 60", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -324,7 +324,7 @@ describe("IgxSlider", () => {
it("should not move thumb slider and value should remain the same when slider is disabled", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -363,7 +363,7 @@ describe("IgxSlider", () => {
it("should change value from 60 to 61 when right arrow is pressed and slider is SLIDER", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -384,7 +384,7 @@ describe("IgxSlider", () => {
it("should change value from 60 to 59 when left arrow is pressed and slider is SLIDER", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -406,7 +406,7 @@ describe("IgxSlider", () => {
it("should switch from left thumb to be focused upper when lower value is near upper" +
"when slider is RANGE", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -435,7 +435,7 @@ describe("IgxSlider", () => {
it("should switch from right thumb to be focused lower when upper value is near lower" +
"when slider is RANGE", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -463,7 +463,7 @@ describe("IgxSlider", () => {
it("should not change value if different key from arrows is pressed and slider is SLIDER", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -492,7 +492,7 @@ describe("IgxSlider", () => {
it("should increment lower value when lower thumb is focused" +
"if right arrow is pressed and slider is RANGE", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -521,7 +521,7 @@ describe("IgxSlider", () => {
it("should increment upper value when upper thumb is focused" +
"if right arrow is pressed and slider is RANGE", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -549,7 +549,7 @@ describe("IgxSlider", () => {
it("should not increment upper value when slider is disabled", (done) => {
let fixture;
- let slider: IgxSlider;
+ let slider: IgxSliderComponent;
TestBed.compileComponents().then(() => {
fixture = TestBed.createComponent(SliderInitializeTestComponent);
slider = fixture.componentInstance.slider;
@@ -604,10 +604,10 @@ describe("IgxSlider", () => {
});
});
@Component({
- selector: "slider-test-component",
+ selector: "igx-slider-test-component",
template: ``
})
class SliderInitializeTestComponent {
- @ViewChild(IgxSlider) public slider: IgxSlider;
+ @ViewChild(IgxSliderComponent) public slider: IgxSliderComponent;
}
diff --git a/src/slider/slider.component.ts b/src/slider/slider.component.ts
index 3480acef955..d5527a03700 100644
--- a/src/slider/slider.component.ts
+++ b/src/slider/slider.component.ts
@@ -30,12 +30,12 @@ const noop = () => {
};
@Component({
- providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSlider, multi: true }],
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSliderComponent, multi: true }],
selector: "igx-slider",
styleUrls: ["./slider.component.scss"],
templateUrl: "slider.component.html"
})
-export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
+export class IgxSliderComponent implements ControlValueAccessor, OnInit, AfterViewInit {
/**
* Disables or enables UI interaction.
*/
@@ -47,7 +47,7 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
* Discrete slider does not have ticks and does not shows bubble labels for values.
*/
@Input()
- public isContinuous: boolean = false;
+ public isContinuous = false;
/**
* The type of the slider. The slider can be SliderType.SLIDER or SliderType.RANGE
@@ -61,7 +61,7 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
* @type {number}
*/
@Input()
- public thumbLabelVisibilityDuration: number = 750;
+ public thumbLabelVisibilityDuration = 750;
/**
* The incremental/decremental step of the value when dragging the thumb.
@@ -69,7 +69,7 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
* @type {number}
*/
@Input()
- public step: number = 1;
+ public step = 1;
/**
* This event is emitted when user has stopped interacting the thumb and value is changed.
@@ -78,7 +78,7 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
@Output()
public onValueChange = new EventEmitter();
- public isActiveLabel: boolean = false;
+ public isActiveLabel = false;
private activeHandle: SliderHandle = SliderHandle.TO;
@@ -97,22 +97,22 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
@ViewChild("thumbTo")
private thumbTo: ElementRef;
- private _minValue: number = 0;
+ private _minValue = 0;
// Measures & Coordinates
- private width: number = 0;
- private xOffset: number = 0;
- private xPointer: number = 0;
- private pPointer: number = 0;
+ private width = 0;
+ private xOffset = 0;
+ private xPointer = 0;
+ private pPointer = 0;
// Limit handle travel zone
- private pMin: number = 0;
- private pMax: number = 1;
+ private pMin = 0;
+ private pMax = 1;
// From/upperValue in percent values
- private hasViewInit: boolean = false;
+ private hasViewInit = false;
private timer;
- private _maxValue: number = 100;
+ private _maxValue = 100;
private _lowerBound?: number;
private _upperBound?: number;
private _lowerValue: number;
@@ -671,8 +671,8 @@ export class IgxSlider implements ControlValueAccessor, OnInit, AfterViewInit {
}
@NgModule({
- declarations: [IgxSlider],
- exports: [IgxSlider],
+ declarations: [IgxSliderComponent],
+ exports: [IgxSliderComponent],
imports: [CommonModule]
})
export class IgxSliderModule {
diff --git a/src/snackbar/snackbar.component.spec.ts b/src/snackbar/snackbar.component.spec.ts
index 0b2651c0ed8..d4a5493d74a 100644
--- a/src/snackbar/snackbar.component.spec.ts
+++ b/src/snackbar/snackbar.component.spec.ts
@@ -1,7 +1,7 @@
import {Component, ViewChild} from "@angular/core";
import {async, TestBed } from "@angular/core/testing";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
-import {IgxSnackbar, IgxSnackbarModule} from "./snackbar.component";
+import {IgxSnackbarComponent, IgxSnackbarModule} from "./snackbar.component";
const oldTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
@@ -44,7 +44,7 @@ describe("IgxSnackbar", () => {
const fixture = TestBed.createComponent(SnackbarInitializeTestComponent);
fixture.detectChanges();
- const displayTime: number = 1000;
+ const displayTime = 1000;
fixture.componentInstance.snackbar.displayTime = displayTime;
fixture.componentInstance.snackbar.show();
@@ -66,7 +66,7 @@ describe("IgxSnackbar", () => {
const fixture = TestBed.createComponent(SnackbarInitializeTestComponent);
fixture.detectChanges();
- const displayTime: number = 1000;
+ const displayTime = 1000;
fixture.componentInstance.snackbar.displayTime = displayTime;
fixture.componentInstance.snackbar.autoHide = false;
@@ -103,11 +103,10 @@ describe("IgxSnackbar", () => {
}));
});
@Component({
- selector: "snackbar-test-component",
template: ``
})
class SnackbarInitializeTestComponent {
public text: string;
- @ViewChild(IgxSnackbar) public snackbar: IgxSnackbar;
+ @ViewChild(IgxSnackbarComponent) public snackbar: IgxSnackbarComponent;
}
diff --git a/src/snackbar/snackbar.component.ts b/src/snackbar/snackbar.component.ts
index c013954ad13..d189527c8a2 100644
--- a/src/snackbar/snackbar.component.ts
+++ b/src/snackbar/snackbar.component.ts
@@ -73,7 +73,7 @@ import { fadeIn, fadeOut, slideInBottom, slideOutBottom } from "../animations/ma
styleUrls: ["./snackbar.component.scss"],
templateUrl: "snackbar.component.html"
})
-export class IgxSnackbar {
+export class IgxSnackbarComponent {
/**
* The message that will be shown message by the IgxSnackbar component
* @type {string}
@@ -84,14 +84,14 @@ export class IgxSnackbar {
* The IgxSnackbar component visual state state
* @type {boolean}
*/
- @Input() public isVisible: boolean = false;
+ @Input() public isVisible = false;
/**
* Sets if the IgxSnackbar component will be hidden after shown
* Default value is true
* @type {number}
*/
- @Input() public autoHide: boolean = true;
+ @Input() public autoHide = true;
/**
* The duration of time span in ms which the IgxSnackbar component will be visible
@@ -99,7 +99,7 @@ export class IgxSnackbar {
* Default value is 4000
* @type {number}
*/
- @Input() public displayTime: number = 4000;
+ @Input() public displayTime = 4000;
/**
* The text of the IgxSnackbar component action
@@ -172,8 +172,8 @@ export class IgxSnackbar {
}
@NgModule({
- declarations: [IgxSnackbar],
- exports: [IgxSnackbar],
+ declarations: [IgxSnackbarComponent],
+ exports: [IgxSnackbarComponent],
imports: [CommonModule]
})
export class IgxSnackbarModule { }
diff --git a/src/switch/switch.component.ts b/src/switch/switch.component.ts
index f0855b335c0..9fe580a3cd2 100644
--- a/src/switch/switch.component.ts
+++ b/src/switch/switch.component.ts
@@ -13,29 +13,29 @@ const noop = () => { };
let nextId = 0;
@Component({
- providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSwitch, multi: true }],
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IgxSwitchComponent, multi: true }],
selector: "igx-switch",
styleUrls: ["./switch.component.scss"],
templateUrl: "switch.component.html"
})
-export class IgxSwitch implements ControlValueAccessor {
+export class IgxSwitchComponent implements ControlValueAccessor {
@Input() public value: any;
- @Input() public id: string = `igx-switch-${nextId++}`;
+ @Input() public id = `igx-switch-${nextId++}`;
@Input()
get labelId() {
return this.id + "_label";
}
@Input() public name: string;
- @Input() public disabled: boolean = false;
+ @Input() public disabled = false;
@Input() public tabindex: number = null;
- @Input() public checked: boolean = false;
+ @Input() public checked = false;
@Output() public change = new EventEmitter();
@ViewChild("checkbox") public nativeCheckbox;
- public focused: boolean = false;
+ public focused = false;
protected _value: any;
@@ -74,7 +74,7 @@ export class IgxSwitch implements ControlValueAccessor {
}
@NgModule({
- declarations: [IgxSwitch],
- exports: [IgxSwitch]
+ declarations: [IgxSwitchComponent],
+ exports: [IgxSwitchComponent]
})
export class IgxSwitchModule { }
diff --git a/src/tabbar/tabbar.component.spec.ts b/src/tabbar/tabbar.component.spec.ts
index eb7d5434096..ebc2c41144a 100644
--- a/src/tabbar/tabbar.component.spec.ts
+++ b/src/tabbar/tabbar.component.spec.ts
@@ -1,7 +1,7 @@
import { AfterContentChecked, AfterViewChecked, Component, ContentChildren, QueryList, ViewChild } from "@angular/core";
import { async, TestBed } from "@angular/core/testing";
import { By } from "@angular/platform-browser";
-import { IgxTab, IgxTabBar, IgxTabBarModule, IgxTabPanel } from "./tabbar.component";
+import { IgxTabBarComponent, IgxTabBarModule, IgxTabComponent, IgxTabPanelComponent } from "./tabbar.component";
describe("TabBar", () => {
beforeEach(async(() => {
@@ -15,8 +15,8 @@ describe("TabBar", () => {
it("should initialize igx-tab-bar, igx-tab-panel and igx-tab", () => {
const fixture = TestBed.createComponent(TabBarTestComponent);
const tabbar = fixture.componentInstance.tabbar;
- let panels: IgxTabPanel[];
- let tabs: IgxTab[];
+ let panels: IgxTabPanelComponent[];
+ let tabs: IgxTabComponent[];
fixture.detectChanges();
@@ -24,12 +24,12 @@ describe("TabBar", () => {
tabs = tabbar.tabs.toArray();
expect(tabbar).toBeDefined();
- expect(tabbar instanceof IgxTabBar).toBeTruthy();
+ expect(tabbar instanceof IgxTabBarComponent).toBeTruthy();
expect(tabbar.panels instanceof QueryList).toBeTruthy();
expect(tabbar.panels.length).toBe(3);
for (let i = 0; i < tabbar.panels.length; i++) {
- expect(panels[i] instanceof IgxTabPanel).toBeTruthy();
+ expect(panels[i] instanceof IgxTabPanelComponent).toBeTruthy();
expect(panels[i].relatedTab).toBe(tabs[i]);
}
@@ -37,7 +37,7 @@ describe("TabBar", () => {
expect(tabbar.tabs.length).toBe(3);
for (let i = 0; i < tabbar.tabs.length; i++) {
- expect(tabs[i] instanceof IgxTab).toBeTruthy();
+ expect(tabs[i] instanceof IgxTabComponent).toBeTruthy();
expect(tabs[i].relatedPanel).toBe(panels[i]);
}
});
@@ -84,8 +84,8 @@ describe("TabBar", () => {
const fixture = TestBed.createComponent(TabBarTestComponent);
const tabbar = fixture.componentInstance.tabbar;
let tabs;
- let tab1: IgxTab;
- let tab2: IgxTab;
+ let tab1: IgxTabComponent;
+ let tab2: IgxTabComponent;
expect(tabbar.selectedIndex).toBe(-1);
fixture.componentInstance.tabSelectedHandler = () => {
@@ -161,7 +161,7 @@ describe("TabBar", () => {
`
})
class TabBarTestComponent {
- @ViewChild(IgxTabBar) public tabbar: IgxTabBar;
+ @ViewChild(IgxTabBarComponent) public tabbar: IgxTabBarComponent;
@ViewChild("wrapperDiv") public wrapperDiv: any;
public tabSelectedHandler(args) {
@@ -200,6 +200,6 @@ class TabBarTestComponent {