خرید بک لینک

Vote count: 0

Hello everyone i have been working alot on my app and added form validation with angularjs. so i used this form ng submit to trigger a function if my inputs and variables contains what they should be.

below is the sample of my login form html

<form ng-submit="login_form.$valid && login()" name="login_form">
            <li align="center">
                <img src="img/xiroos-logo.png" alt="Xiroos Logo">
            </li>
            <li>
                <div class="form-group">
                    <sup>Email</sup>
                    <input type="text" name="userName" ng-model="userName" class="input-text form-control input-lg" ng-class="((login_form.userName.$valid)?'valid':'invalid')" ng-required="true" placeholder="[email protected]" />
                </div>
            </li>
            <li>
                <div class="form-group">
                    <sup>Password</sup>
                    <input type="password" name="password" ng-model="password" class="input-text form-control input-lg" ng-class="((login_form.password.$valid)?'valid':'invalid')" ng-required="true" placeholder="• • • • • • • •" />
                </div>
            </li>
            <li>
                <xr-loading status='loading'></xr-loading>
                <input type="submit" ng-init="btnText='Login'" ng-click="!login_form.$valid && xrAlert({'title':'Oops!','body':'Fill all required fileds.'})" class="btn btn-block btn-round btn-orange shadow" ng-value="btnText" />
            </li>
            <li align="center">
                <p><small><a ui-sref="forgot_password">Forgot your password?</a></small></p>
            </li>
        </form>

If i try to login without putting anything in my inputs. i will get a popup modal to fill up required fields. I'm testing my app in my browser of course. then when i tried to parse my app to mobile app. and i tried in on my android.

It seems it doesn't trigger my form submit and also it doesn't show my popup modal on ng-click of my login button

asked 19 secs ago

برچسب: ionic form ng,submit, نویسنده: استخدام کار تاريخ: چهارشنبه 17 شهريور 1395 ساعت: 2:13

صفحه بندی