<<<<<<< HEAD
=======
/**
 *
 */
angular.module("myApp", ["ui.router", 'ngRoute']).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023

angular.module("myApp", ["ui.router","ngResource","ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
    $locationProvider.hashPrefix('');
<<<<<<< HEAD
    $urlRouterProvider.otherwise("/news");
    $stateProvider
        .state("layout1", {
=======
    //trở về trang mặc định
    $urlRouterProvider.otherwise("/admin");

    $stateProvider
        .state("layout3", {
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout3.html"
                }
            }
        })
        // .state("layout4", {
        //     abstract: true,
        //     views: {
        //         "layout": {
        //             templateUrl: "layout/layout4.html"
        //         }
        //     }
        // })
        .state("admin", {
            parent: 'layout3',
            url: "/admin",
            views: {
<<<<<<< HEAD
                "layout": {
                    templateUrl: "layout/layout2.html",
                    controller: "homeController"
=======
                "content": {
                    templateUrl: "pages/adminhome/admin-home.html",
                    controller: "adminController"
                }
            }
        })
        .state("login", {
            parent: 'layout4',
            url: "/login",
            views: {
                "content": {
                    templateUrl: "pages/login/login.html",
                    controller: "loginController"
                }
            }
        })
        .state("register", {
            parent: 'layout4',
            url: "/register",
            views: {
                "content": {
                    templateUrl: "pages/login/register.html",
                    controller: "loginController"
                }
            }
        })
        .state("forgot-password", {
            parent: 'layout4',
            url: "/forgot-password",
            views: {
                "content": {
                    templateUrl: "pages/login/forgot-password.html",
                    controller: "loginController"
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
                }
            }
        })
        .state("layout3", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout3.html"
                }
            }
        })
        .state("news", {
            parent: 'layout2',
            url: "/news",
            views: {
                "content": {
                    templateUrl: "pages/homepage/homepage.html",
                    controller: "homeController"
                }
            }
        })
        .state("newsDetail",{
            parent:'layout2',
            url:"/news/:Id1",
            views:{
                "content":{
                    templateUrl: "pages/homepage/newsDetail.html",
                    controller: "homeController"
                }
            }
        })
        .state("NewsByCatalogi",{
            parent:'layout2',
            url:"/news/catagori/:catagoriId",
            views:{
                "content":{
                    templateUrl: "pages/homepage/newsDetailByCatalogi.html",
                    controller: "homeController"
                }
            }
        })
        .state("CatagoriManagement",{
            parent:'layout3',
            url:"/management/catagori",
            views:{
                "content":{
                    templateUrl: "pages/homepage/catagoriManagements.html",
                    controller: "homeController"

<<<<<<< HEAD
                }
            }
        })
        .state("newsManagement",{
            parent:'layout3',
            url:"/management/catagori/:myCatagoriId",
            views:{
                "content":{
                    templateUrl: "pages/homepage/newsManagements.html",
                    controller: "homeController"

                }
            }
        })
=======
        // .state('app', {
        //     abstract: true,
        //     views: {
        //         'main_layout': {
        //             templateUrl: 'main_layout.html',
        //         }
        //     }
        // })

>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
        .state("employees", {
            parent: 'layout3',
            url: "/employees",
            views: {
                "content": {
                    templateUrl: "pages/employee/employee.html",
                    controller: "employeeController"
                }
            }
        })
        .state("project", {
            parent: 'layout3',
            url: "/project",
            views: {
                "content": {
                    templateUrl: "pages/project/project/projectListViews.html",
                    controller: "showProject"
                }
            }
        })
        .state("addproject", {
            parent: 'layout3',
            url: "/addproject",
            views: {
                "content": {
                    templateUrl: "pages/project/project/projectAddViews.html",
                    controller: "insertProject"
                }
            }
        })
        .state("timeSheet", {
            parent: 'layout3',
            url: "/timesheet",
            views: {
                "content": {
                    templateUrl: "/pages/timesheet/timeSheet.html",
                    controller: "timeSheetController"
                }
            }
        })
        .state("timeSheetDetail", {
            parent: 'layout3',
            url: "/timesheetdetail/:id",
            views: {
                "content": {
                    templateUrl: "/pages/timesheet/timeSheetDetail.html",
                    controller: "timeSheetDetailController"
                }
            }
        })
        .state("leaveForm", {
            parent: 'layout3',
            url: "/leaveform",
            views: {
                "content": {
                    templateUrl: "/pages/leaveform/leaveForm.html",
                    controller: "leaveFormController"
                }
            }
        })

<<<<<<< HEAD
});

=======
        .state("leaveFormDetail", {
            parent: 'layout3',
            url: "/leaveformdetail/:id",
            views: {
                "content": {
                    templateUrl: "/pages/leaveform/leaveFormDetail.html",
                    controller: "leaveFormDetailController"
                }
            }
        })

        // .state("testlayout2", {
        //     parent: 'layout2',
        //     url: "/testttt",
        //     views: {
        //         "content": {
        //             templateUrl: "/pages/testlayout/testlayout.html",
        //             controller: "testlayoutController"
        //         }
        //     }
        // })
        .state("gioithieu", {
            parent: 'app',
            url: "/gioithieu",
            views: {
                "content": {
                    templateUrl: "pages/gioithieu/gioithieu.htm",
                    controller: "gioithieuController"
                }
            }
        })

        .state("editproject", {
            parent: 'layout3',
            url: "/editproject/:ID",
            views: {
                "content": {
                    templateUrl: "pages/project/project/projectEditViews.html",
                    controller: "loadProjectDetail"
                }
            }
        })
        .state("groupProjectByProjectId", {
            parent: 'layout3',
            url: "/groupProjectByProjectId/:ID",
            views: {
                "content": {
                    templateUrl: "pages/project/groupproject/groupProjectView.html",
                    controller: "loadGroupProjectByProjectId"
                }
            }
        })
        .state("addEmployeeProject", {
            parent: 'layout3',
            url: "/addEmployeeProject",
            views: {
                "content": {
                    templateUrl: "pages/project/groupproject/groupProjectAddView.html",
                    controller: "insertEmployeeProject"
                }
            }
        })
});

    // .state("lienhe", {
    // 	parent: 'app',
    //     url: "/lienhe",
    //     views:{
    //     	"content":{
    //     		 templateUrl: "pages/lienhe/lienhe.htm",
    //     	     controller: "lienheController"
    //     	}
    //     }
    // })
    

// myApp.directive('ngConfirmClick', [ function() {
//     return {
//         link : function(scope, element, attr) {
//             var msg = attr.ngConfirmClick || "Are you sure?";
//             var clickAction = attr.confirmedClick;
//             element.bind('click', function(event) {
//                 if (window.confirm(msg)) {
//                     scope.$eval(clickAction)
//                 }
//             });
//         }
//     };
// } ])
>>>>>>> ed09ed47f5d092a7753469913def1ab676073023
