基于豆瓣API+Angular开发的web App

2020-06-17 06:47:17易采站长站整理

    $urlRouterProvider.otherwise(“/”);
    /*状态配置*/
    $stateProvider
        //首页
        .state(‘index’,{
            url: ‘/’,
            views:{
                header:{
                    templateUrl: ‘../html/views/list_header.html’,
                    controller: ‘SearchController’
                },
                container:{
                    templateUrl: ‘../html/views/list_book.html’,
                    controller: ‘BookListController’
                },
                footer:{
                    templateUrl: ‘../html/views/list_footer.html’,
                    controller: ”
                }
            }
        })
        //book list
        .state(‘book_list’,{
            url: ‘/book’,
            views:{
                header:{
                    templateUrl: ‘../html/views/list_header.html’,
                    controller: ‘SearchController’
                },
                container:{