Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. var app= angular.module("LoginModule",[]);
  2. app.controller("LoginController",['$scope','$http','$location',function($scope,$http,$location){
  3. $scope.submitForm= function(valid){
  4. if(valid){
  5. $http.get('/admin/dashboard').success(function(data){
  6. $location.path('dashboard');
  7. });
  8. }
  9. };
  10. }]);
  11.  
  12. var express = require('express');
  13. var router = express.Router();
  14.  
  15. /* GET home page. */
  16. router.get('/admin', function(req, res) {
  17. res.render('admin/login', { title: 'Login' });
  18. });
  19.  
  20.  
  21. router.get('/admin/dashboard', function(req, res) {
  22. //res.render('admin/dashboard', { title: 'Welcome to dashboard' });
  23. res.send("success");
  24. });
  25.  
  26. module.exports = router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement