How to set up my electron application using angular.js?

I am trying to create electron application using angular.js, but somehow, i can’t make it to go to my default view, all other views work perfectly, but when my path is “/” it sends me always to otherwise part.

I tried both
$locationProvider.html5Mode({enabled: true, requireBase: false});
$locationProvider.html5Mode({enabled: true, requireBase: true});
<base href="/">,
and every other route is working except my “/” route. When I try the same in browser, it works like a charm.

Considering that i haven’t finished yet my “Register” part, i set up, that when clicked, it sends you to “/”, and it also works. The only thing that won’t work is when first time entering “/” route.

Can somebody explain what I am doing wrong?

This is my “index.html”:

    <title>DEMO APP MINZE</title>
    <link rel="stylesheet" href="">
    <link href=",600,700&display=swap" rel="stylesheet"/>
    <link rel="stylesheet" href="css/main.css">
    <script src=""></script>
    <script src=""></script>
    <script src="js/scripts.js"></script>
    <script src="views/templates.js"></script>
<!--    <base href="/">-->
    <li><a href="/#/login" class="login">Login</a</li>
    <li><a href="/#/" class="register">Register</a></li>    

This is my electron part:

function createMainWindow() {

    win = new BrowserWindow({
        width: 800, height: 600, show: true, webPreferences: {
            preload: path.join(__dirname, 'preload.js'),
            nodeIntegration: false
            //contextIsolation: true,
        pathname: path.join(__dirname, './dist/index.html'),
        protocol: 'file',
        slashes: true

function createWindows() {

app.on('ready', () => {

    win.on('closed', () => {
        console.log('cao cao');
        win = null;

And this is my angular routing:

angular.module('templates', [
            templateUrl : "welcome.html"
            templateUrl : "login.html",
            controller : "loginCtrl"
            templateUrl: 'success.html',
            controller: "successCtrl"
            template : "<h1>Error 404 !!!</h1>"
    $locationProvider.html5Mode({enabled: true, requireBase: false});

Source: AngularJS