ng-switch

angularjs - ng-switch does not bind ng-model

泪湿孤枕 提交于 2019-11-26 09:46:32
问题 I have this repro http://embed.plnkr.co/nVCmukG5abpi1Y4ZHkrq that show when I click \'Title3\' and enter a value in text box although the entered value shows reflected in the UI, when I click the \'click\' button nothing is binded for the scope attribute $scope.test. I don\'t know what is wrong with ng-switch or maybe I\'m doing something wrong. Help is appreciated!!! http://embed.plnkr.co/nVCmukG5abpi1Y4ZHkrq 回答1: This is a scope inheritance problem due to ng-switch creating its own scope.