Skip to content

Commit de64d33

Browse files
committed
fix: #216 - review that properties that are accessed from template are public
1 parent fb51519 commit de64d33

16 files changed

+24
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This package assumes that you are building an Angular2 app with TypeScript. Angu
2020
**Here is a plnkr if you'd like to play around http://plnkr.co/edit/I3dLfLUDIH2xlEJqj0da?p=preview.**
2121

2222

23-
### Status of the npm package version 2.0 (mdl version 1.2.1; angular 2.0 final)
23+
### Status of the npm package version 2 (mdl version 1.2.1; angular 2 final)
2424

2525
- Badges
2626
- Buttons

src/lib/components/badge/mdl-badge.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class MdlBadgeDirective implements OnChanges {
1818

1919
private el: HTMLElement;
2020

21-
@Input('mdl-badge') private mdlBadgeContent: string;
21+
@Input('mdl-badge') public mdlBadgeContent: string;
2222

2323
constructor(private elementRef: ElementRef, private renderer: Renderer) {
2424
this.el = elementRef.nativeElement;

src/lib/components/button/mdl-button.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export class MdlButtonComponent implements OnChanges {
6060

6161
private element: HTMLElement;
6262

63-
@Input('mdl-button-type') private mdlButtonType: 'raised' | 'fab' | 'mini-fab' | 'icon' | '' ;
64-
@Input('mdl-colored') private mdlColoredType: 'primary' | 'accent' | '';
63+
@Input('mdl-button-type') public mdlButtonType: 'raised' | 'fab' | 'mini-fab' | 'icon' | '' ;
64+
@Input('mdl-colored') public mdlColoredType: 'primary' | 'accent' | '';
6565
@Input() @BooleanProperty() public disabled = false;
6666

6767
constructor(public elementRef: ElementRef, private renderer: Renderer) {

src/lib/components/checkbox/mdl-checkbox.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class MdlCheckboxComponent implements ControlValueAccessor {
5757

5858
@Input() @BooleanProperty() public disabled = false;
5959

60-
private change: EventEmitter<boolean> = new EventEmitter<boolean>();
60+
public change: EventEmitter<boolean> = new EventEmitter<boolean>();
6161

6262
private value_: boolean = false;
6363

src/lib/components/chips/mdl-chip.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export class MdlChipComponent {
2828

2929
@Input('mdl-label') public mdlLabel;
3030
@Input('mdl-action-icon') public mdlActionIcon;
31-
@Output('action-click') private actionClick = new EventEmitter();
32-
@ContentChild(MdlChipContactDirective) protected chipContact: MdlChipContactDirective;
31+
@Output('action-click') public actionClick = new EventEmitter();
32+
@ContentChild(MdlChipContactDirective) public chipContact: MdlChipContactDirective;
3333

3434
public action() {
3535
this.actionClick.emit();

src/lib/components/common/mdl-ripple.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { MaterialRipple } from './ripple.vendor';
1313

1414
// known bugs: https://github.com/google/material-design-lite/issues/4215
15-
export class MdlRippleDirective implements OnChanges{
15+
export class MdlRippleDirective implements OnChanges {
1616

1717
private RIPPLE = 'mdl-ripple';
1818

src/lib/components/layout/mdl-layout-content.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class MdlLayoutContentComponent {
2020

2121
@ContentChildren(MdlLayoutTabPanelComponent) public tabs: QueryList<MdlLayoutTabPanelComponent>;
2222

23-
protected el: HTMLElement;
23+
public el: HTMLElement;
2424

2525
constructor(private elRef: ElementRef) {
2626
this.el = elRef.nativeElement;

src/lib/components/layout/mdl-layout-header.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class MdlLayoutHeaderComponent {
5353

5454
// set from MdlLayoutComponent
5555
public mode: string;
56-
protected el: HTMLElement;
56+
public el: HTMLElement;
5757
public isCompact = false;
5858
public isAnimating = false;
5959
public isSeamed = false;

src/lib/components/layout/mdl-layout.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ export class MdlLayoutComponent implements AfterContentInit, OnDestroy, OnChange
7474
@Input('mdl-layout-fixed-header') @BooleanProperty() public isFixedHeader = false;
7575
@Input('mdl-layout-header-seamed') @BooleanProperty() public isSeamed = false;
7676
@Input('mdl-layout-tab-active-index') @NumberProperty() public selectedIndex: number = 0;
77-
@Input('mdl-ripple') @BooleanProperty() protected isRipple = false;
77+
@Input('mdl-ripple') @BooleanProperty() public isRipple = false;
7878
@Input('mdl-layout-no-drawer-button') @BooleanProperty() public isNoDrawer = false;
7979
@Output('mdl-layout-tab-active-changed') public selectedTabEmitter = new EventEmitter();
8080
@Output('mdl-layout-tab-mouseover') public mouseoverTabEmitter = new EventEmitter();
8181
@Output('mdl-layout-tab-mouseout') public mouseoutTabEmitter = new EventEmitter();
8282

83-
@Output('open') onOpen = new EventEmitter<void>();
84-
@Output('close') onClose = new EventEmitter<void>();
83+
@Output('open') public onOpen = new EventEmitter<void>();
84+
@Output('close') public onClose = new EventEmitter<void>();
8585

8686
public isDrawerVisible = false;
8787
public isSmallScreen = false;

src/lib/components/list/mdl-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class MdlListComponent {}
4444
})
4545
export class MdlListItemComponent implements OnInit, OnChanges {
4646

47-
@Input() @NumberProperty() private lines: number = 1;
47+
@Input() @NumberProperty() public lines: number = 1;
4848

4949
constructor(@Optional() private mdlListComponent: MdlListComponent) {}
5050

0 commit comments

Comments
 (0)