Skip to content

Commit

Permalink
two ways of reproducing no value for accessor '' error in clicker iss…
Browse files Browse the repository at this point in the history
…ue 108
  • Loading branch information
dorontal committed Jul 3, 2016
1 parent d1af66c commit b9bf36e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 5 additions & 2 deletions app/pages/page2/page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@

<ion-content padding class="message bye-ionic">
<h2>Bye!</h2>
<!-- NOTE: tried it with either <ion-range> or <ion-input> and
both produce the error " No value accessor for '' " -->
<!-- NOTE: the clicker issue 108 error can be reproduced either with
an <ion-range> or with an <ion-input> element with an
[(ngModel)]. uncomment either one of those lines and uncomment
the corresponding lines in page2.ts that change the type of
'value' -->
<!--ion-range [(ngModel)]="value"></ion-range-->
<ion-input [(ngModel)]="value" type="text"></ion-input>
</ion-content>
11 changes: 8 additions & 3 deletions app/pages/page2/page2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ import {Component} from '@angular/core';
templateUrl: 'build/pages/page2/page2.html',
})
export class Page2 {
private value: any;
// NOTE: reproducing clicker issue 108: 'value' should be a string
// type if you uncommented the <ion-input> line in page2.html, or
// if you uncommented <ion-range>, then 'value' should be an int

// private value: number;
private value: string;
constructor() {
// NOTE: use number value if uncommenting <ion-range> in template
// or use string value if uncommenting <ion-input> in template

use number value if uncommenting <ion-range> in template
// this.value = 33;
this.value = 'some text';
}
Expand Down

0 comments on commit b9bf36e

Please sign in to comment.