离子2输入的形式输入区域被隐藏

时间:2017-06-17 13:14:41

标签: html angular ionic2

我已经实现了登录页面,但表单不显示输入区域(行)

这就是我所拥有的

$('[type=submit]').submit(function(e) {
    e.preventDefault();
    var formHtml = $(this).parent().html();

    $.ajax({
        ..all these options..,
        beforeSend: function(xhr) {
            $('form').html("sending mail");
        },
        success: function(data) {
            $('form').html(formHtml); // I think here's the problem...
        }     
    });
});

以上生成

enter image description here

我期待着

enter image description here

正如您所看到的,第一张图片上的输入字段不可见,我还需要添加什么

1 个答案:

答案 0 :(得分:0)

只需检查您是否已包含.css文件并在index.html中引用它

<ion-navbar *navbar>
  <ion-title>
    Ionic 2
  </ion-title>
</ion-navbar>
<ion-content >
  <ion-list>
    <ion-item>
      <ion-label fixed>Username</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label fixed>Password</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
  </ion-list>
</ion-content>

<强> DEMO

相关问题