I’ve been working on solving the problem of the code at http://play.ionic.io/app/b2ece31d7dba
If I press the ADD2 button in the modal window, the error “undefined is not an object (evaluating ‘u.player_name’)” is shown. After some investigation, the code work successfully when I put the ADD1 button in the ion-content. From the result, I suppose ion-header-bar and ion-content are different scope but they are in the same ng-controller.
I want to place the button in ion-header-bar, and I want to pass the value of ng-model in the ion-content to createPlayer(). Any advice would be appreciated.