javascript - Drop down user Authentication with Angular -


so have 1 html page suppose log in page. have far drop down menu, , button says log in.

i looked other ways user authentication work, question is: how possible use drop down menu, select user, , press log in, , log in specific user.

i looking ng-route, angular's location services redirect when press "log in" button.

<div class="login">          <p>welcome log-in page!</p>         <!--this user selects username-->         <select>             <option value="" disabled="disabled" selected="selected">please select name</option>             <option value="1">username1</option>             <option value="2">username2</option>         </select>          <br \>         <br \>          <!--this login button-->         <button type="button" ng-click=""> login </button>        </div> 

edit:

i understand question or @ least trying seems vague, trying follow git-hub project states

"the login screen allows user select name. no password required. clicking login button takes them screen."

i doing learn front-end , make first web-app.

second edit:

https://github.com/archfirst/trader-desktop

this git hub project picked up.

i dont know if understand when question if you're trying redirect when user click on "log in", can add function on ng-click directive

<button type="button" ng-click="login()"> login </button> 

and in controller define function redirect appropriate route. this.

$scope.login = function() {     $state.go(home_state); } 

home_state being state defined on route home after logging.


Comments