Sydnie S
Sydnie S

Reputation: 333

how to add a single text input and button to a popup in ionic?

i'm trying to customize a popup but the app turns blank. how do i add just a single button and text input in the popup? my code is:

var myPopup = $ionicPopup.show({
      template: '<input type="password" ng-model="userdata.password2">'
      title: 'Change Password',
      scope: $scope,
      buttons: [
           { text: 'Ok' },
               {
                   type: 'button-positive',
                    onTap: function(e)
                    {
                         if(e == true)
                        {
                             myPopup.close();
                            $location.path('/page14');
                         }

                    }
                }
            ]
       });

Upvotes: 0

Views: 541

Answers (1)

IftekharDani
IftekharDani

Reputation: 3729

Add "," end of template:

template: '<input type="password" ng-model="userdata.password2">',

Upvotes: 1

Related Questions