Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app= angular.module("LoginModule",[]);
- app.controller("LoginController",['$scope','$http','$location',function($scope,$http,$location){
- $scope.submitForm= function(valid){
- if(valid){
- $http.get('/admin/dashboard').success(function(data){
- $location.path('dashboard');
- });
- }
- };
- }]);
- var express = require('express');
- var router = express.Router();
- /* GET home page. */
- router.get('/admin', function(req, res) {
- res.render('admin/login', { title: 'Login' });
- });
- router.get('/admin/dashboard', function(req, res) {
- //res.render('admin/dashboard', { title: 'Welcome to dashboard' });
- res.send("success");
- });
- module.exports = router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement