How to use Pnotify inside the angle

Asked

Viewed 187 times

1

i have the following code and I want to use Pnotify to give notifications when the user and/or password is incorrect or/e white mandatory field. How do I? Remember that I am using Asp.net mvc and have already referenced Pnotify’s Javascript and CSS file in my Layout.cshtml

<div>
    <a class="hiddenanchor" id="signup"></a>
    <a class="hiddenanchor" id="signin"></a>

    <div class="login_wrapper">
        <div class="animate form login_form" ng-controller="LoginCtrl">
            <section class="login_content">
                <form>
                    <h1>Login Form</h1>
                    <div>
                        <input type="text" class="form-control" placeholder="Username" required="" ng-model="model.username" />
                    </div>
                    <div>
                        <input type="password" class="form-control" placeholder="Password" required="" ng-model="model.password"/>
                    </div>




                    <div>
                        <a class="btn btn-default submit" ng-click="doLogin(model)">Log in</a>
                        <a class="reset_pass" href="#">Lost your password?</a>
                    </div>

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

                    <div class="separator">
                        <p class="change_link">
                            New to site?
                            <a href="#signup" class="to_register"> Create Account </a>
                        </p>

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

                        <div>
                            <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
                            <p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p>
                        </div>
                    </div>
                </form>
            </section>
        </div>

        <div id="register" class="animate form registration_form">
            <section class="login_content">
                <form>
                    <h1>Create Account</h1>
                    <div>
                        <input type="text" class="form-control" placeholder="Username" required="" />
                    </div>
                    <div>
                        <input type="email" class="form-control" placeholder="Email" required="" />
                    </div>
                    <div>
                        <input type="password" class="form-control" placeholder="Password" required="" />
                    </div>
                    <div>
                        <a class="btn btn-default submit" href="index.html">Submit</a>
                    </div>

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

                    <div class="separator">
                        <p class="change_link">
                            Already a member ?
                            <a href="#signin" class="to_register"> Log in </a>
                        </p>

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

                        <div>
                            <h1><i class="fa fa-paw"></i> Gentelella Alela!</h1>
                            <p>©2016 All Rights Reserved. Gentelella Alela! is a Bootstrap 3 template. Privacy and Terms</p>
                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
  • Your question is not clear, could improve, it is very simple to use Pnotity, what are the difficulties? Has some code?

1 answer

1


just put the references in Pnotify inside your ng-app which is in the Layout.cshtml file

<body class="nav-md" ng-app="AutonavAPP">
@RenderBody()

<!--PNotify-->
<script src="~/vendors/pnotify/dist/pnotify.js" type="text/javascript"></script>
<link href="~/vendors/pnotify/dist/pnotify.css" media="all" rel="stylesheet" type="text/css" />

Browser other questions tagged

You are not signed in. Login or sign up in order to post.