diff --git a/.gitignore b/.gitignore index 072da860d5..038776f66d 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ ng2-bootstrap.js.map factories /**/*.metadata.json +/**/*.ngfactory.ts diff --git a/components/accordion/accordion.component.ts b/components/accordion/accordion.component.ts index 05e361b23c..fd90c44160 100644 --- a/components/accordion/accordion.component.ts +++ b/components/accordion/accordion.component.ts @@ -12,7 +12,7 @@ export class AccordionComponent { /* tslint:disable:no-unused-variable */ @HostBinding('class.panel-group') - private addClass:boolean = true; + public addClass:boolean = true; /* tslint:enable:no-unused-variable */ private groups:Array = []; diff --git a/components/accordion/readme.md b/components/accordion/readme.md index 51bac7c08d..147be6dd6d 100644 --- a/components/accordion/readme.md +++ b/components/accordion/readme.md @@ -16,7 +16,7 @@ export class AccordionComponent { @Input() public closeOthers:boolean; @HostBinding('class.panel-group') - private addClass = true; + public addClass = true; } // component AccordionGroup diff --git a/components/alert/alert.component.ts b/components/alert/alert.component.ts index 525e54a464..be97fde3b7 100644 --- a/components/alert/alert.component.ts +++ b/components/alert/alert.component.ts @@ -22,7 +22,7 @@ export class AlertComponent implements OnInit { @Output() public close:EventEmitter = new EventEmitter(false); - private closed:boolean; + public closed:boolean; private classes:Array = []; public ngOnInit():any { diff --git a/components/buttons/readme.md b/components/buttons/readme.md index 0b721ff54c..04d9e0e1da 100644 --- a/components/buttons/readme.md +++ b/components/buttons/readme.md @@ -21,8 +21,8 @@ export class ButtonRadioDirective implements ControlValueAccessor, OnInit { // directive ButtonCheckbox @Directive({ selector: '[btnCheckbox][ngModel]' }) export class ButtonCheckboxDirective implements ControlValueAccessor, OnInit { - @Input() private btnCheckboxTrue:any; - @Input() private btnCheckboxFalse:any; + @Input() public btnCheckboxTrue:any; + @Input() public btnCheckboxFalse:any; @HostBinding('class.active') private state:boolean = false; diff --git a/components/carousel/carousel.component.ts b/components/carousel/carousel.component.ts index e4d5fcd367..f49b151fca 100644 --- a/components/carousel/carousel.component.ts +++ b/components/carousel/carousel.component.ts @@ -50,7 +50,7 @@ export class CarouselComponent implements OnDestroy { this.restartTimer(); } - private slides:Array = []; + public slides:Array = []; private currentInterval:any; private isPlaying:boolean; private destroyed:boolean = false; diff --git a/components/carousel/readme.md b/components/carousel/readme.md index a3e71ed5c4..3873046de5 100644 --- a/components/carousel/readme.md +++ b/components/carousel/readme.md @@ -12,9 +12,9 @@ import { CarouselModule } from 'ng2-bootstrap/components/carousel'; selector: 'carousel' }) export class CarouselComponent implements OnDestroy { - @Input() private noWrap:boolean; - @Input() private noPause:boolean; - @Input() private noTransition:boolean; + @Input() public noWrap:boolean; + @Input() public noPause:boolean; + @Input() public noTransition:boolean; @Input() public get interval():number {} } @@ -32,7 +32,7 @@ export class SlideComponent implements OnInit, OnDestroy { @HostBinding('class.item') @HostBinding('class.carousel-item') - private addClass:boolean = true; + public addClass:boolean = true; } ``` diff --git a/components/collapse/collapse.directive.ts b/components/collapse/collapse.directive.ts index df4475c399..de14609ba0 100644 --- a/components/collapse/collapse.directive.ts +++ b/components/collapse/collapse.directive.ts @@ -34,30 +34,30 @@ export class CollapseDirective implements OnInit { // @HostBinding('style.height') // private height:string; @HostBinding('style.display') - private display:string; + public display:string; // shown @HostBinding('class.in') @HostBinding('attr.aria-expanded') - private isExpanded:boolean = true; + public isExpanded:boolean = true; // hidden @HostBinding('attr.aria-hidden') - private isCollapsed:boolean = false; + public isCollapsed:boolean = false; // stale state @HostBinding('class.collapse') - private isCollapse:boolean = true; + public isCollapse:boolean = true; // animation state @HostBinding('class.collapsing') - private isCollapsing:boolean = false; + public isCollapsing:boolean = false; // @Input() private transitionDuration:number = 500; // Duration in ms @Input() - private set collapse(value:boolean) { + public set collapse(value:boolean) { this.isExpanded = value; this.toggle(); } - private get collapse():boolean { + public get collapse():boolean { return this.isExpanded; } diff --git a/components/common.ts b/components/common.ts index 6e26ea1e5a..79080e362d 100644 --- a/components/common.ts +++ b/components/common.ts @@ -15,14 +15,14 @@ export class NgTranscludeDirective { private _ngTransclude:TemplateRef; @Input() - private set ngTransclude(templateRef:TemplateRef) { + public set ngTransclude(templateRef:TemplateRef) { this._ngTransclude = templateRef; if (templateRef) { this.viewRef.createEmbeddedView(templateRef); } } - private get ngTransclude():TemplateRef { + public get ngTransclude():TemplateRef { return this._ngTransclude; } diff --git a/components/datepicker/datepicker-inner.component.ts b/components/datepicker/datepicker-inner.component.ts index c8e9515daa..36e798170a 100644 --- a/components/datepicker/datepicker-inner.component.ts +++ b/components/datepicker/datepicker-inner.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { DateFormatter } from './date-formatter'; @@ -69,6 +69,8 @@ export class DatePickerInnerComponent implements OnInit, OnChanges { @Output() public selectionDone:EventEmitter = new EventEmitter(undefined); + @Output() public update:EventEmitter = new EventEmitter(false); + public stepDay:any = {}; public stepMonth:any = {}; public stepYear:any = {}; @@ -87,9 +89,6 @@ export class DatePickerInnerComponent implements OnInit, OnChanges { private refreshViewHandlerYear:Function; private compareHandlerYear:Function; - @Output() - private update:EventEmitter = new EventEmitter(false); - @Input() public get activeDate():Date { return this._activeDate; @@ -125,7 +124,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges { if (this.initDate) { this.activeDate = this.initDate; - this.selectedDate = new Date(this.activeDate.valueOf()); + this.selectedDate = new Date(this.activeDate.valueOf() as number); this.update.emit(this.activeDate); } else if (this.activeDate === undefined) { this.activeDate = new Date(); @@ -133,7 +132,8 @@ export class DatePickerInnerComponent implements OnInit, OnChanges { } // this.refreshView should be called here to reflect the changes on the fly - public ngOnChanges():void { + // tslint:disable-next-line:no-unused-variable + public ngOnChanges(changes:SimpleChanges):void { this.refreshView(); } @@ -255,7 +255,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges { this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1]; } - this.selectedDate = new Date(this.activeDate.valueOf()); + this.selectedDate = new Date(this.activeDate.valueOf() as number); this.update.emit(this.activeDate); this.refreshView(); } diff --git a/components/datepicker/monthpicker.component.ts b/components/datepicker/monthpicker.component.ts index a6fbb500f5..419ed2ac70 100644 --- a/components/datepicker/monthpicker.component.ts +++ b/components/datepicker/monthpicker.component.ts @@ -35,7 +35,7 @@ import { DatePickerInnerComponent } from './datepicker-inner.component';