$rootScope.$broadcast not working
问题 I am trying to get $rootScope.$broadcast to refresh my view. The service is- var app = angular.module("productsApp", []) .service("serviceProvider", function ($http) { this.getDatas = function getDatas(data) { return $http({ method: 'POST', url: serviceUrl + '/GetProductsByCategoryOrName', headers: { 'Authorization': apiKey }, data: data }) } return this }).factory("sharedService", function ($rootScope) { var mySharedService = {}; mySharedService.values = []; mySharedService.passData =