i make straight search engine. Get data from Google Api. My first view is home page and here is only form search and list results. My two view contain player.
My route provider:
$routeProvider.
when('/home', {
templateUrl: 'view/home.html',
controller: 'ZippyListCtrl'
}).
when('/mp3/:wwwId/:zippyId', {
templateUrl: 'view/mp3.html',
controller: 'Mp3DetailCtrl'
}).
otherwise({
redirectTo: '/home'
});
}])
My controllers:
zippycatControllers.controller('ZippyListCtrl', ['$scope', '$http', function($scope, $http) {
$scope.dane = {};
$scope.ladowanie = 0;
var url = "http://ajax.googleapis.com/ajax/services/search/web?callback=JSON_CALLBACK";
$scope.search = function() {
if ($scope.dane) {
$scope.ladowanie = 1;
$http({
url: url,
params: {q: $scope.dane.q, "start": 0, v: "1.0", rsz: "large", "pws": 0},
method: 'JSONP'
}).success(function (responseData) {
//console.log(responseData);
$scope.ladowanie = 0;
$scope.message = responseData;
})
}
}}]);
and:
zippycatControllers.controller('Mp3DetailCtrl', ['$scope', '$routeParams', '$sce', function($scope, $routeParams, $sce) {
$scope.player = $sce.trustAsHtml(
'code player');}]);
My question is: how search on two view?
search on two viewmean?