Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is right way to use select directive in angular.dart
    text
    copied!<p>I extend angular.dart.tutorial with basic CRUD operations. So in new edit_recipe_component.html I need to add some sort of selection input for recipe categories.</p> <p>Currently I have </p> <pre class="lang-html prettyprint-override"><code>&lt;select ng-model="ctrl.recipe.category"&gt; &lt;option ng-repeat="c in ctrl.categories" value="{{c}}"&gt;{{c}}&lt;/option&gt;&lt;/select&gt; </code></pre> <p>That works perfectly well on the surface: I can select category from the list, selected category is successfully stored in model and so on. But I get these errors in debug console:</p> <pre><code>NoSuchMethodError : method not found: 'ngValue' Receiver: null Arguments: [] STACKTRACE: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:42) #1 _SingleSelectMode.onModelChange.&lt;anonymous closure&gt; (package:angular/directive/input_select.dart:185:78) #2 _SelectMode._forEachOption (package:angular/directive/input_select.dart:146:24) #3 _SingleSelectMode.onModelChange (package:angular/directive/input_select.dart:183:19) </code></pre> <p>What I'm doing wrong?</p> <p>Unfortunately <a href="http://ci.angularjs.org/view/Dart/job/angular.dart-master/javadoc/angular.directive/InputSelectDirective.html" rel="nofollow">APIDOCS to InputSelectDirective</a> has no usage section</p> <p><strong>Update</strong>: I've created github project based on Chapter 6 sample where problem is reproduced It is here: <a href="https://github.com/vadimtsushko/angular_tutorial_chapter_06" rel="nofollow">https://github.com/vadimtsushko/angular_tutorial_chapter_06</a></p> <p>Some debugging shows that setting category in Edit form works immediately and successfully (I've added category in Recipes list view for debug purpose). Error raised when I leave Edit form.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload