how to post data to model in loopback

6 views
Skip to first unread message

Bipin Shukla

unread,
Feb 26, 2018, 7:50:08 AM2/26/18
to StrongLoop
hello guys i m new to loopback, don't know to post data to model eg:
here is my login.ejs file

    <form action="/login" method="post">
   <input type="text" name="username" placeholder="username">
   <input type="password" name="password" placeholder="password">
   <input type="submit" name="" value="Submit">
    </form>
now when user click on login how i can submit send it to model through router of directly call model root.js

       app.post('/login', login.index);
how i can call login model from root.js or directly access login model js
Reply all
Reply to author
Forward
0 new messages