JavaScript 下面的$broadcast什么意思呀?谁能解释下画红线的两行代码的意思?
angular.module('fridgePage',['ionic','fridgePage.controllers']).run(["$ionicPlatform"...
angular.module('fridgePage', ['ionic','fridgePage.controllers']).run(["$ionicPlatform","$rootScope"
,function($ionicPlatform,$rootScope) {
var self = this;
this.saveData = function(str) {
$rootScope.$broadcast('getTempratureData', str);
};
this.initData = function(jsonArray) {
$rootScope.$broadcast('init', jsonArray);
}; 展开
,function($ionicPlatform,$rootScope) {
var self = this;
this.saveData = function(str) {
$rootScope.$broadcast('getTempratureData', str);
};
this.initData = function(jsonArray) {
$rootScope.$broadcast('init', jsonArray);
}; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询