当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript IRootScopeService.%24broadcast方法代码示例

本文整理汇总了TypeScript中angular.IRootScopeService.%24broadcast方法的典型用法代码示例。如果您正苦于以下问题:TypeScript IRootScopeService.%24broadcast方法的具体用法?TypeScript IRootScopeService.%24broadcast怎么用?TypeScript IRootScopeService.%24broadcast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angular.IRootScopeService的用法示例。


在下文中一共展示了IRootScopeService.%24broadcast方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 vm.openCompare = () => {
   ngDialog.closeAll();
   $rootScope.$broadcast('dim-store-item-compare', {
     item: vm.item,
     dupes: true
   });
 };
开发者ID:bhollis,项目名称:DIM,代码行数:7,代码来源:dimMoveItemProperties.directive.ts

示例2:

 const refresh = _.throttle(() => {
   // Individual pages should listen to this event and decide what to refresh,
   // and their services should decide how to cache/dedup refreshes.
   // This event should *NOT* be listened to by services!
   // TODO: replace this with an observable?
   $rootScope.$broadcast('dim-refresh');
 }, ONE_MINUTE, { trailing: false });
开发者ID:delphiactual,项目名称:DIM,代码行数:7,代码来源:activity-tracker.directive.ts

示例3: Destiny1Controller

function Destiny1Controller(
  this: IController,
  $rootScope: IRootScopeService,
  hotkeys,
  $scope: IScope,
  $i18next
) {
  'ngInject';

  hotkeys = hotkeys.bindTo($scope);

  hotkeys.add({
    combo: ['i'],
    description: $i18next.t('Hotkey.ToggleDetails'),
    callback() {
      $rootScope.$broadcast('dim-toggle-item-details');
    }
  });

  itemTags.forEach((tag) => {
    if (tag.hotkey) {
      hotkeys.add({
        combo: [tag.hotkey],
        description: $i18next.t('Hotkey.MarkItemAs', {
          tag: $i18next.t(tag.label)
        }),
        callback() {
          $rootScope.$broadcast('dim-item-tag', { tag: tag.type });
        }
      });
    }
  });
}
开发者ID:delphiactual,项目名称:DIM,代码行数:33,代码来源:destiny1.component.ts

示例4:

 vm.updateTag = () => {
   vm.item.dimInfo.tag = vm.selected.type;
   if (!vm.item.dimInfo.tag) {
     delete vm.item.dimInfo.tag;
   }
   $rootScope.$broadcast('dim-filter-invalidate');
   vm.item.dimInfo.save!();
 };
开发者ID:bhollis,项目名称:DIM,代码行数:8,代码来源:item-tag.component.ts

示例5: if

 .then(() => {
   if (type === 'lock') {
     item.locked = state;
   } else if (type === 'track') {
     item.tracked = state;
   }
   $rootScope.$broadcast('dim-filter-invalidate');
 })
开发者ID:bhollis,项目名称:DIM,代码行数:8,代码来源:dimMoveItemProperties.directive.ts

示例6: callback

 itemTags.forEach((tag) => {
   if (tag.hotkey) {
     hotkeys.add({
       combo: [tag.hotkey],
       description: $i18next.t('Hotkey.MarkItemAs', {
         tag: $i18next.t(tag.label)
       }),
       callback() {
         $rootScope.$broadcast('dim-item-tag', { tag: tag.type });
       }
     });
   }
 });
开发者ID:delphiactual,项目名称:DIM,代码行数:13,代码来源:destiny1.component.ts

示例7:

 $rootScope.$applyAsync(() => {
   $rootScope.$broadcast('i18nextLanguageChange');
 });
开发者ID:delphiactual,项目名称:DIM,代码行数:3,代码来源:settings.component.ts

示例8:

 intervalId = $interval(() => {
   // just start reloading stores more often
   $rootScope.$broadcast('dim-refresh');
 }, 60000);
开发者ID:delphiactual,项目名称:DIM,代码行数:4,代码来源:d2farming.service.ts


注:本文中的angular.IRootScopeService.%24broadcast方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。