I am currently writing a desktop hybrid application with Electron with AngularJS integration for routing, etc., see the following angular config:
app.config(function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/dashboard.html',
controller: 'dashboardController'
})
.when('/sites', {
templateUrl: 'partials/sites.html',
controller: 'sitesController'
})
.when('/sites/:site', {
templateUrl: 'partials/site.html',
controller: 'siteController'
})
.when('/sites/:site/content', {
templateUrl: 'partials/site_content.html',
controller: 'contentController'
})
.when('/sites/:site/content/create', {
templateUrl: 'partials/site_content_create.html',
controller: 'createController'
})
.when('/sites/:site/content/:contentId/edit', {
templateUrl: 'partials/site_content_edit.html',
controller: 'editController'
})
.when('/user', {
templateUrl: 'patials/user.html',
controller: 'userController'
})
.when('/user/edit', {
templateUrl: 'partials/user_edit.html',
controller: 'userEditController'
})
.when('/login', {
templateUrl: 'partials/login.html',
controller: 'loginController'
})
.when('/register', {
templateUrl: 'partials/register.html',
controller: 'registerController'
});
$routeProvider.otherwise({
redirectTo: '/'
});
});
The application loads fine, and the original "dashboard.html" is entered into the ng-view completely fine.
The problem occurs when I click on a tag to load in another view, for example, site.html. I get a full white screen without errors being output to the console, and no errors coming from node.js.
I am wondering if this is a known issue, or if I did something wrong in my configuration.
source
share