angularjs - ng-repeat not working, am I missing something? -


i've set :

  $scope.privates = [     {value:'private'},     {value:'public'}   ]; 

and in view :

%h2 etablissement   %div{"data-ng-repeat" => "private in privates"}     %input{"data-ng-model" => "filterprivacy[private.value]",:type => "checkbox"}       {{private.value}} 

and renders :

        <h2>etablissement</h2>         <div data-ng-repeat-start='private in privates'>           <input data-ng-model='filterprivacy[private.value]' type='checkbox'>         </div> 

the {{private.value}}isn't showing anywhere , should have 2 inputs cause i've got 2 values. missing ? cordially, rob

p.s : when test {{privates}} renders me

<div ng-repeat='private in privates'>    [{"value":"private"},{"value":"public"}] </div> 

there issue in rendered code, should use data-ng-repeat instead of data-ng-repeat-start, if change part, works : http://jsfiddle.net/jjfzv/1/

if want use data-ng-repeat-start think should include data-ng-repeat-end

i initialized $scope.filterprivacy={}; in controller, assumed did , not main issue

with data-ng-repeat-start/end renders : http://jsfiddle.net/jjfzv/3/
have fun


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -