На проекте сделал уже несколько страниц, теперь появился вопрос, как сделать страницу входа, тоесть чтобы изначально когда заходишь на сайт перекидало на страницу входа.
Я использую $stateProvider и такой способ создания страниц
MetronicApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
// Redirect any unmatched url
$urlRouterProvider.otherwise("/dashboard.html");
$stateProvider
// Dashboard
.state('dashboard', {
url: "/dashboard.html",
templateUrl: "views/dashboard.html",
data: {pageTitle: 'Admin Dashboard Template'},
controller: "DashboardController",
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'MetronicApp',
insertBefore: '#ng_load_plugins_before', // load the above css files before a LINK element with this ID. Dynamic CSS files must be loaded between core and theme css files
files: [
'assets/global/plugins/morris/morris.css',
'assets/global/plugins/morris/morris.min.js',
'assets/global/plugins/morris/raphael-min.js',
'assets/global/plugins/jquery.sparkline.min.js',
'assets/pages/scripts/dashboard.min.js',
'js/controllers/DashboardController.js'
]
});
}]
}
})
// Blank Page
.state('blank', {
url: "/blank",
templateUrl: "views/blank.html",
data: {pageTitle: 'Blank Page Template'},
controller: "BlankController",
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load({
name: 'MetronicApp',
insertBefore: '#ng_load_plugins_before', // load the above css files before a LINK element with this ID. Dynamic CSS files must be loaded between core and theme css files
files: [
'js/controllers/BlankController.js'
]
});
}]
}
})
// AngularJS plugins
.state('fileupload', {
url: "/file_upload.html",
templateUrl: "views/file_upload.html",
data: {pageTitle: 'AngularJS File Upload'},
controller: "GeneralPageController",
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load([{
name: 'angularFileUpload',
files: [
'assets/global/plugins/angularjs/plugins/angular-file-upload/angular-file-upload.min.js'
]
}, {
name: 'MetronicApp',
files: [
'js/controllers/GeneralPageController.js'
]
}]);
}]
}
})
// UI Select
.state('uiselect', {
url: "/ui_select.html",
templateUrl: "views/ui_select.html",
data: {pageTitle: 'AngularJS Ui Select'},
controller: "UISelectController",
resolve: {
deps: ['$ocLazyLoad', function($ocLazyLoad) {
return $ocLazyLoad.load([{
name: 'ui.select',
insertBefore: '#ng_load_plugins_before', // load the above css files before '#ng_load_plugins_before'
files: [
'assets/global/plugins/angularjs/plugins/ui-select/select.min.css',
'assets/global/plugins/angularjs/plugins/ui-select/select.min.js'
]
}, {
name: 'MetronicApp',
files: [
'js/controllers/UISelectController.js'
]
}]);
}]
}
})
Как прописать в настройках, что бы посторонним не было доступно ничего кроме формы логина и пароля? Подскажите как в моем случае решить эту проблему, поделись информацией, возможно уже есть видеоурок на эту тему или туториал, или возможно у вас была похожая ситуация. Буду очень рад)
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости