javascript - Error: undefined is not an object (evaluating 'this.props.menuOptions.map') -


using angular, react , reactng, error:

error: undefined not object (evaluating 'this.props.menuoptions.map')

here code:

http://jsbin.com/xuranipuza/1/edit?html,js,output

it seems missing providing attributes in react directive element respect proptypes passing in. because places watch on these attribute values (reflecting scope property name) , populate props accordingly.

so:

 <sidebar-button menu-options="menuoptions" button-image="buttonimage"                  button-image-mini="buttonimagemini" menu-option-bottom="menuoptionbottom">  </sidebar-button> 

bin

doc says:

the reactdirective service read react component proptypes , watch attributes these names. if react component doesn't have proptypes defined can pass in array of attribute names watch. default, attributes watched value can choose watch reference or collection supplying watch-depth attribute. possible values reference, collection , value (default).

disclaimer: have not used ng-react before.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -