2016-01-18 59 views
1

我提交表單時出現問題,當我提交表單時什麼也沒有發生,但似乎應該正確地發送登錄名和密碼數據。我試圖提交一個沒有ngSubmit的表單,因爲在我的情況下這是不可能的(我的輸入是由Stormpath + Flask動態生成的),無論如何,我想避免使用角度指令提交,如果可能的話。無法使用AngularJS + Stormpath提交表單

這裏是窗體的代碼:

<!-- Login --> 
<div class="center-block lc-block" id="l-login" data-ng-class="{ 'toggled': lctrl.login === 1 }" 
data-ng-if="lctrl.login === 1"> 
<form role="form" method="post"> 
     {% with messages = get_flashed_messages() %} 
     {% if messages %} 
     <div class="alert alert-danger alert-dismissible" role="alert"> 
      <span type="button" class="close" data-dismiss="alert" aria-label="Close"> 
       <span aria-hidden="true">×</span> 
      </span> 
      {% for message in messages %} 
      {{ message }} 
      {% endfor %} 
     </div> 
     {% endif %} 
     {% endwith %} 
     {{ form.hidden_tag() }} 
    <div class="block-header"> 
     <h3>Sign In</h3> 
    </div> 
    <div class="input-group m-b-20"> 
     <span class="input-group-addon"><i class="zmdi zmdi-account"></i></span> 
     <div class="fg-line"> 
      {% if config['STORMPATH_ENABLE_USERNAME'] %} 
      {{ form.login(autofocus='true', class='form-control', placeholder='Username', required='true') }} 
      {% else %} 
      {{ form.login(autofocus='true', class='form-control', placeholder='Username or Email', required='true') 
      }} 
      {% endif %} 
     </div> 
    </div> 

    <div class="input-group m-b-20"> 
     <span class="input-group-addon"><i class="zmdi zmdi-male"></i></span> 
     <div class="fg-line"> 
      {{ form.password(class='form-control', placeholder='Password', required='true') }} 
     </div> 
    </div> 

    <div class="clearfix"></div> 

    <div class="checkbox"> 
     <label> 
      <input type="checkbox" value=""> 
      <i class="input-helper"></i> 
      Keep me signed in 
     </label> 
    </div> 

    <button class="btn btn-login btn-danger btn-float" type="submit" value="submit"><i 
      class="zmdi zmdi-arrow-forward"></i></button> 

    <ul class="login-navigation"> 
     <button style="margin-right:10px;" class="btn bgm-lightblue waves-effect" data-ng-click="lctrl.login = 0; lctrl.register = 1">Create Account</button> 
     <button class="btn btn-warning waves-effect" data-ng-click="lctrl.login = 0; lctrl.forgot = 1">Forgot Password?</button> 
    </ul> 
</form> 

所有輸入都通過動態生成Stormpath。這裏可能有什麼錯誤?

回答