Since upgrading to RC1, I'm running into some trouble with input binding. Here's the code snippet for the view:
<form class="form-inline">
<div class="form-group">
<select id="limitControl" class="form-control"
[(ngModel)]="limit" (change)="limitChanged($event)">
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="0">All</option>
</select>
<label for="limitControl"> {{recordType}} per page</label>
</div>
</form>
This is the view template for the following component:
@Component({
selector: 'limiter',
templateUrl: 'frontend/common/limiter/view.html',
styleUrls: ['frontend/common/limiter/style.css']
})
export class LimiterComponent {
limit: number = 10;
@Input() recordType: string;
@Output() limitChangedEvent = new EventEmitter<number>();
limitChanged($event) {
this.limitChangedEvent.emit($event.currentTarget.value);
}
}
The parent component calls it like this:
<limiter (limitChangedEvent)="limitChanged($event)"
[recordType]="Campaigns"></limiter>
It seems that "recordType" is not getting passed into the child component properly. Any suggestions on how to fix this?