I am in the process of developing a web application using jhipster, which incorporates bootstrap and angular js.
When I create a new entity, like Department, it automatically generates CRUD operations for me.
Upon creating a department, a modal popup appears. However, I prefer this to be displayed on a separate HTML page rather than as a popup.
How can I change the modal dialog to open in a new HTML file instead? https://i.sstatic.net/U0b3d.png
This is my current state.js file:
.state('department.new', {
parent: 'department',
url: '/new',
data: {
authorities: ['ROLE_USER']
},
onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {
$uibModal.open({
templateUrl: 'app/entities/department/department-dialog.html',
controller: 'DepartmentDialogController',
controllerAs: 'vm',
backdrop: 'static',
size: 'lg',
resolve: {
entity: function () {
return {
deptId: null,
deptName: null,
id: null
};
}
}
}).result.then(function() {
$state.go('department', null, { reload: true });
}, function() {
$state.go('department');
});
}]
})
Do you recommend changing the state configuration like this?
.state('department.new', {
parent: 'department',
url: '/new',
data: {
authorities: ['ROLE_USER']
},
views: {
'content@': {
templateUrl: 'app/entities/department/department-dialog.html',
controller: 'DepartmentDialogController',
controllerAs: 'vm',
}
},
resolve: {
entity: function () {
return {
deptId: null,
deptName: null,
id: null
};
}
}
.result.then(function() {
$state.go('department', null, { reload: true });
}, function() {
$state.go('department');
}),
})