mirror of
https://github.com/wu736139669/vczero.github.io.git
synced 2026-08-05 06:23:38 +00:00
add search page in search web app
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*仅负责搜索页面的打开*/
|
||||
var SearchController = function($scope, $rootScope, $location){
|
||||
var path = $location.path();
|
||||
$scope.goToSearch = function(){
|
||||
if(path.indexOf('/book') !== -1 || path === '/'){
|
||||
$location.path('/search/book');
|
||||
|
||||
}else if(path.indexOf('/music') !== -1 || path === '/music'){
|
||||
$location.path('/search/music');
|
||||
|
||||
|
||||
}else if(path.indexOf('/movie') !== -1 || path === '/movie'){
|
||||
$location.path('/search/movie');
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
SearchController.$inject = ['$scope', '$rootScope', '$location'];
|
||||
app.controller('SearchController', SearchController);
|
||||
Reference in New Issue
Block a user