+
diff --git a/demo/components/main-menu/search-filter.pipe.ts b/demo/components/main-menu/search-filter.pipe.ts
index 2c5efc4eb2..9e01a8b484 100644
--- a/demo/components/main-menu/search-filter.pipe.ts
+++ b/demo/components/main-menu/search-filter.pipe.ts
@@ -1,21 +1,16 @@
-import {Pipe} from 'angular2/core';
-
-@Pipe({
- name: 'SearchFilter'
-})
-
-export class SearchFilter {
- transform(value:any, args:any) {
- let [text] = args;
+import {Pipe, PipeTransform} from '@angular/core';
+@Pipe({name: 'SearchFilter'})
+export class SearchFilterPipe implements PipeTransform {
+ public transform(value:any, text:any):any {
if (!text) {
return value;
}
- var items:any = value;
- var newItems:any = [];
+ const items:any = value;
+ const newItems:any = [];
- items.forEach(function (item:any) {
+ items.forEach(function (item:any):void {
if (item.name.toLowerCase().indexOf(text.toLowerCase()) !== -1) {
newItems.push(item);
}
diff --git a/demo/components/modal-section.ts b/demo/components/modal-section.ts
index b033f7365c..e1910a2d1f 100644
--- a/demo/components/modal-section.ts
+++ b/demo/components/modal-section.ts
@@ -1,11 +1,8 @@
import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
-import {TAB_DIRECTIVES} from '../../ng2-bootstrap';
import {ModalDemoComponent} from './modal/modal-demo';
-
-let name = 'Modals';
-let src = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/modal/';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/modal/readme.md');
@@ -14,53 +11,20 @@ let titleDoc = require('../../components/modal/title.md');
let ts = require('!!prismjs?lang=typescript!./modal/modal-demo.ts');
let html = require('!!prismjs?lang=markup!./modal/modal-demo.html');
-const template = `
-
-
- -
- -
- -
- -
- `;
-
@Component({
selector: 'modal-section',
- template: template,
- directives: [ModalDemoComponent, TAB_DIRECTIVES, CORE_DIRECTIVES]
+ directives: [ModalDemoComponent, DemoSectionComponent, CORE_DIRECTIVES],
+ template: `
+
+
+ `
})
export class ModalSectionComponent {
+ public name:string = 'Modals';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/tree/master/components/modal';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
+
}
diff --git a/demo/components/pagination-section.ts b/demo/components/pagination-section.ts
index 80e06520f0..889c8c56cf 100644
--- a/demo/components/pagination-section.ts
+++ b/demo/components/pagination-section.ts
@@ -2,7 +2,7 @@ import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {PaginationDemoComponent} from './pagination/pagination-demo';
-import {DemoSection} from './demo-section';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/pagination/readme.md');
@@ -13,17 +13,17 @@ let html = require('!!prismjs?lang=markup!./pagination/pagination-demo.html');
@Component({
selector: 'pagination-section',
- directives: [DemoSection, PaginationDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, PaginationDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
- private name:string = 'Pagination';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/pagination';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class PaginationSectionComponent {
+ public name:string = 'Pagination';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/pagination';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/progressbar-section.ts b/demo/components/progressbar-section.ts
index b6465832d9..4ccbb867e2 100644
--- a/demo/components/progressbar-section.ts
+++ b/demo/components/progressbar-section.ts
@@ -3,7 +3,7 @@ import {CORE_DIRECTIVES} from '@angular/common';
import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../../ng2-bootstrap';
import {ProgressbarDemoComponent} from './progressbar/progressbar-demo';
-import {DemoSection} from './demo-section';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/progressbar/readme.md');
@@ -20,17 +20,17 @@ let html = templates[Ng2BootstrapConfig.theme];
@Component({
selector: 'progressbar-section',
- directives: [DemoSection, ProgressbarDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, ProgressbarDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
- private name:string = 'Progressbar';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/progressbar';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class ProgressbarSectionComponent {
+ public name:string = 'Progressbar';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/progressbar';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/rating-section.ts b/demo/components/rating-section.ts
index e2622247c4..fb5c57ac6c 100644
--- a/demo/components/rating-section.ts
+++ b/demo/components/rating-section.ts
@@ -2,7 +2,7 @@ import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {RatingDemoComponent} from './rating/rating-demo';
-import {DemoSection} from './demo-section';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/rating/readme.md');
@@ -13,17 +13,17 @@ let html = require('!!prismjs?lang=markup!./rating/rating-demo.html');
@Component({
selector: 'rating-section',
- directives: [DemoSection, RatingDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, RatingDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
- private name:string = 'Rating';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/rating';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class RatingSectionComponent {
+ public name:string = 'Rating';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/rating';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/tabs-section.ts b/demo/components/tabs-section.ts
index 516cd36095..dfccdf4a8b 100644
--- a/demo/components/tabs-section.ts
+++ b/demo/components/tabs-section.ts
@@ -2,7 +2,7 @@ import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {TabsDemoComponent} from './tabs/tabs-demo';
-import {DemoSection} from './demo-section';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/tabs/readme.md');
@@ -13,17 +13,17 @@ let html = require('!!prismjs?lang=markup!./tabs/tabs-demo.html');
@Component({
selector: 'tabs-section',
- directives: [DemoSection, TabsDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, TabsDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
- private name:string = 'Tabs';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/tabs';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class TabsSectionComponent {
+ public name:string = 'Tabs';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/tabs';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/timepicker-section.ts b/demo/components/timepicker-section.ts
index 50ba2d246f..8eca6f5755 100644
--- a/demo/components/timepicker-section.ts
+++ b/demo/components/timepicker-section.ts
@@ -2,7 +2,7 @@ import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {TimepickerDemoComponent} from './timepicker/timepicker-demo';
-import {DemoSection} from './demo-section';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/timepicker/readme.md');
@@ -13,18 +13,17 @@ let html = require('!!prismjs?lang=markup!./timepicker/timepicker-demo.html');
@Component({
selector: 'timepicker-section',
- directives: [DemoSection, TimepickerDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, TimepickerDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
-
- private name:string = 'Timepicker';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/timepicker';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class TimepickerSectionComponent {
+ public name:string = 'Timepicker';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/timepicker';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/tooltip-section.ts b/demo/components/tooltip-section.ts
index 3d55a421cc..0c5a547177 100644
--- a/demo/components/tooltip-section.ts
+++ b/demo/components/tooltip-section.ts
@@ -2,10 +2,7 @@ import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {TooltipDemoComponent} from './tooltip/tooltip-demo';
-import {DemoSection} from './demo-section';
-
-let name = 'Tooltip';
-let src = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/tooltip';
+import {DemoSectionComponent} from './demo-section';
// webpack html imports
let doc = require('../../components/tooltip/readme.md');
@@ -16,17 +13,17 @@ let html = require('!!prismjs?lang=markup!./tooltip/tooltip-demo.html');
@Component({
selector: 'tooltip-section',
- directives: [DemoSection, TooltipDemo, CORE_DIRECTIVES],
+ directives: [DemoSectionComponent, TooltipDemoComponent, CORE_DIRECTIVES],
template: `
`
})
-
- private name:string = 'Tooltip';
- private src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/tooltip';
- private html:string = html;
- private ts:string = ts;
- private titleDoc:string = titleDoc;
- private doc:string = doc;
+export class TooltipSectionComponent {
+ public name:string = 'Tooltip';
+ public src:string = 'https://github.com/valor-software/ng2-bootstrap/blob/master/components/tooltip';
+ public html:string = html;
+ public ts:string = ts;
+ public titleDoc:string = titleDoc;
+ public doc:string = doc;
}
diff --git a/demo/components/top-menu/top-menu.component.ts b/demo/components/top-menu/top-menu.component.ts
index b416039c36..ae6de21e4a 100644
--- a/demo/components/top-menu/top-menu.component.ts
+++ b/demo/components/top-menu/top-menu.component.ts
@@ -1,5 +1,5 @@
-import {Component} from 'angular2/core';
-import {RouterLink} from 'angular2/router';
+import {Component} from '@angular/core';
+import {RouterLink} from '@angular/router-deprecated';
// webpack html imports
let template = require('./top-menu.template.html');
@@ -9,6 +9,5 @@ let template = require('./top-menu.template.html');
template: template,
directives: [RouterLink]
})
-
export class TopMenuComponent {
}
diff --git a/demo/components/top-menu/top-menu.template.html b/demo/components/top-menu/top-menu.template.html
index 2c7c169194..c69bda2962 100644
--- a/demo/components/top-menu/top-menu.template.html
+++ b/demo/components/top-menu/top-menu.template.html
@@ -17,12 +17,12 @@
{{route.name}}
-
+
${name}(src)
- -- -
${titleDoc}
-
- - -
-
-
- Example
-
-
-
- - -
-
-
-
-
-
-
-
-
-
-
- ${html}
-
-
- ${ts}
- - -
-
- API
-${doc}
- ng2-bootstrap
-
+