This question is put up by me after several efforts. but unfortunately no result. I'm using angularjs and expressjs. I turned off hashbang mode using `$location.html5Mode(true)` and adding `<base href="/">`. It worked for a glance. But when I pressed F5 button. It showed me a very ugly page without any css or js script loaded ???? Any help would be appreciated. I'm currently using expressjs skeleton with node.js.

**Here's my App.Js File Code**

```
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var app = express();

var viewRoutes = require('./routes/view'),
    loginRoutes = require('./routes/login');

// view engine setup
app.set('views', path.join(__dirname, 'views'));  //setting to HTML engine instead of EJS | JADE 
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', viewRoutes);
app.use('/login', loginRoutes);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: err
    });
  });
}

// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
  res.status(err.status || 500);
  res.render('error', {
    message: err.message,
    error: {}
  });
});

module.exports = app;

```

**Here's my COntroller File COde :**

```
var amApp = angular.module('amApp', ['ngRoute']);

amApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
    $locationProvider.html5Mode(true);
    $routeProvider
        .when('/', {
            templateUrl: '/home',
            controller: 'homeCtrl'
        })
        .when('/home', {
            templateUrl: '/home',
            controller: 'homeCtrl'
        })
        .when('/login', {
            templateUrl: '/login',
            controller: 'loginCtrl'
        })
        .otherwise('/');
}]);

```

**Here's my Route File named view.js**

```
var express = require('express');
var router = express.Router();

/* GET home page. */

router.get('/', function(req, res, next) {
  res.render('index');
});

router.get('/home', function(req, res, next) {
  res.render('pages/home');
});

router.get('/login', function(req, res, next) {
  res.render('pages/login');
});

module.exports = router;

```

I'm using HTMl instead of EJS or JADE..