$scope.openAddNewSubPopup = function(){
var addNewSub = $ionicPopup.show({
scope: $scope,
template: '<label class="item item-input"><input type="text" model="addNewSubItemValue"></label>'
});
addNewSub.then(function(res) {
console.log($scope.addNewSubItemValue)
});
Anyone have idea why I’m getting undefined here? when I tried to do {{addNewSubItemValue}} in the template, it did bind well.