/**
 *
 */
<<<<<<< HEAD
<<<<<<< HEAD
// angular.module("myApp", ["ui.router", 'ngRoute']).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
=======
angular.module("myApp", ["ngAnimate","ui.router","ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
>>>>>>> 14cbe76ccc34395abe463875cb178d2c872e3f85
=======
angular.module("myApp", ["ngAnimate", "ui.router", "ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
>>>>>>> 049511c3b37f668c637022150c53bd25d9b8e61d

    $locationProvider.hashPrefix('');
<<<<<<< HEAD
    // $urlRouterProvider.otherwise("/news");
    //trở về trang mặc định
    $urlRouterProvider.otherwise("/admin");

    $stateProvider
        .state("layout3", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout3.html"
                }
            }
        })
        .state("admin", {
            parent: 'layout3',
            url: "/admin",
            views: {
                "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"
                }
            }
        })
        .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"
                }
            }
        })
        .state("newsManagement",{
            parent:'layout3',
            url:"/management/catagori/:myCatagoriId",
            views:{
                "content":{
                    templateUrl: "pages/homepage/newsManagements.html",
                    controller: "homeController"

                }
            }
        })
=======
    $urlRouterProvider.otherwise("/employees");

    $stateProvider
        .state("layout1", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout1.html"
                }
            }
        })
        .state("layout2", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout2.html"
                }
            }
        })


>>>>>>> 14cbe76ccc34395abe463875cb178d2c872e3f85
        .state("employees", {
            parent: 'layout1',
            url: "/employees",
            views: {
                "content": {
                    templateUrl: "pages/employee/employee.html",
                    controller: "employeeController"
                }
            }
        })
        .state("createEmployee", {
            parent: 'layout1',
            url: "/createEmployee",
            params: {
                emp: null
            },
            views: {
                "content": {
                    templateUrl: "pages/employee/createEmployee.html",
                    controller: "createEmployeeController"
                }
            }
        })
<<<<<<< HEAD
        .state("leaveFormDetail", {
            parent: 'layout3',
            url: "/leaveformdetail/:id",
            views: {
                "content": {
                    templateUrl: "/pages/leaveform/leaveFormDetail.html",
                    controller: "leaveFormDetailController"
                }
            }
        })
        .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("timeSheet", {
        //     parent: 'layout1',
        //     url: "/timesheet",
        //     views: {
        //         "content": {
        //             templateUrl: "pages/timesheet/leaveFromeaveFromDetail.html",
        //             controller: "leaveFormController"
        //         }
        //     }
        // })
        // .state("timeSheetDetail", {
        //     parent: 'layout1',
        //     url: "/timesheetdetail/:id",
        //     views: {
        //         "content": {
        //             templateUrl: "pages/timesheet/l",
        //             controller: "timeSheetDetailController"
        //         }
        //     }
        // })
        .state("leaveform", {
            parent: 'layout1',
            url: "/leaveform",
            views: {
                "content": {
                    templateUrl: "pages/leaveform/leaveForm.html",
                    controller: "leaveFormController"
                }
            }
        })

        .state("leaveFormDetail", {
            parent: 'layout1',
            url: "/leaveformdetail/:id",
            views: {
                "content": {
                    templateUrl: "pages/leaveform/leaveFormDetail.html",
                    controller: "leaveFormDetailController"
                }
            }
        })
        .state("timesheet",{
            parent:'layout1',
            url:"/timesheet",
            views:{
                "content":{
                    templateUrl:"pages/timesheet/timesheet.html",
                    controller:"timeSheetController"
                }
            }
        })
        .state("timesheetDetail",{
            parent:'layout1',
            url:"/timesheetDetail/:id",
            views:{
                "content":{
                    templateUrl:"page/timesheet/timeSheetDetail.html",
                    controller:"timeSheetDetailController"
                }
            }

        })
        .state("project", {
            parent: 'layout1',
            url: "/project",
            views: {
                "content": {
                    templateUrl: "pages/project/project.html",
                    controller: "projectController"
                }
            }
        })
        .state("news",{
            parent:'layout1',
            url:"/news",
            views:{
                "content":{
                    templateUrl:"pages/homepage/catagoriManagements.html",
                    controller:"homeController"
                }
            }
        })

});

angular
    .module('myApp')
    .filter('lmto', lmto);

<<<<<<< HEAD
    function lmto() {
        return function(items,limit,offset){
            if(items.length > 0) {
                return items.slice(offset, offset + limit);
            } else {
                return [];
            }
        };
    }
>>>>>>> 14cbe76ccc34395abe463875cb178d2c872e3f85
=======
function lmto() {
    return function (items, limit, offset) {
        if (items.length > 0) {
            return items.slice(offset, offset + limit);
        } else {
            return [];
        }
    };
}
>>>>>>> 049511c3b37f668c637022150c53bd25d9b8e61d
