Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Editing a Modal with a number/text input field?

$
0
0

@sukhsingh wrote:

Hi, I am using a multi-modal form to submit some data. Wile other modals are select modals and they work fine and can be edit any number of times, the one with the input field works the first time. But when I try editing it - the modal never renders. I can see a blinking cursor and keyborard but the whole screen is white. Below is my code:

Modal Declaration in the Form Controlller
$ionicModal.fromTemplateUrl('templates/priceentrymodal.html', function(modal) {
$scope.pmodalCtrl = modal;
}, {
scope: $scope,
animation: 'slide-in-left',
focusFirstInput: true
});

$scope.openpModal = function() {
$scope.pmodalData = {};
$scope.pmodalCtrl.show();
};

Controller for the Modal:
app.controller('PriceController', function($scope) {

$scope.hideModal = function() {
$scope.pmodalCtrl.hide();
};

$scope.item = {};
$scope.doSomething = function(item) {
console.log('going with pentry Modal');
$scope.pmodalData.myvalue = $scope.item.myvalue;
$scope.pmodalCtrl.hide();

    $scope.$on('modal.hidden', function() {

    $scope.item = {};

});
};

});

Modal HTML




Cancel

Price Paid


Save



    </div>

    </ion-content>
  </div>



</ion-content>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles