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


TypeScript IComponentControllerService.default方法代码示例

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


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

示例1: beforeEach

    beforeEach(mock.inject((
                            $componentController: IComponentControllerService,
                            $rootScope: IRootScopeService,
                            _$q_: IQService,
                            $uibModal: IModalService,
                            _accountService_: AccountService,
                            $state: StateService,
                            _applicationReader_: ApplicationReader) => {

      $scope = $rootScope.$new();
      $q = _$q_;
      accountService = _accountService_;
      applicationReader = _applicationReader_;

      spyOn(applicationReader, 'listApplications').and.callFake(() => {
        return $q.when(applicationList);
      });

      spyOn(accountService, 'listAccounts').and.callFake(() => {
        return $q.when([]);
      });

      ctrl = $componentController('applications', {
        $scope: $scope,
        $uibModal: $uibModal,
        accountService: accountService,
        $state: $state,
      }) as ApplicationsController;
      $scope.viewState.sortModel.key = 'name';
    }));
开发者ID:jcwest,项目名称:deck,代码行数:30,代码来源:applications.component.spec.ts

示例2:

 const initializeController = (data: any) => {
   $ctrl = $componentController(
     'chaosMonkeyExceptions',
     { $scope: null, $q },
     data,
   ) as ChaosMonkeyExceptionsController;
 };
开发者ID:emjburns,项目名称:deck,代码行数:7,代码来源:chaosMonkeyExceptions.component.spec.ts

示例3:

 const initialize = () => {
   ctrl = $componentController(
     'deployInitializer',
     {},
     { application, command: { viewState: {} }, cloudProvider: 'aws' },
   ) as DeployInitializerController;
   ctrl.$onInit();
 };
开发者ID:emjburns,项目名称:deck,代码行数:8,代码来源:deployInitializer.component.spec.ts

示例4:

 const initialize = () => {
   $ctrl = $componentController(
     'awsMetricSelector',
     { $scope },
     { alarm, serverGroup, alarmUpdated },
   ) as MetricSelectorController;
   $ctrl.$onInit();
 };
开发者ID:mizzy,项目名称:deck,代码行数:8,代码来源:metricSelector.component.spec.ts

示例5: spyOn

 const initializeController = (command: IDeploymentCommand) => {
   $ctrl = $componentControllerService(
     'deploymentStrategySelector',
     {},
     { command },
   ) as DeploymentStrategySelectorController;
   spyOn(DeploymentStrategyRegistry, 'listStrategies').and.returnValue(strategies);
   spyOn(DeploymentStrategyRegistry, 'getStrategy').and.callFake((key: string) => strategies.find(s => s.key === key));
 };
开发者ID:mizzy,项目名称:deck,代码行数:9,代码来源:deploymentStrategySelector.component.spec.ts

示例6: spyOn

 const initialize = (accounts: IAccount[], images: IDockerImage[]) => {
   spyOn(AccountService, 'listAccounts').and.returnValue($q.when(accounts));
   spyOn(DockerImageReader, 'findImages').and.returnValue($q.when(images));
   $ctrl = $componentController(
     'dockerImageAndTagSelector',
     { DockerImageReader },
     { organization, registry, repository, tag, account, showRegistry },
   ) as DockerImageAndTagSelectorController;
   $ctrl.$onInit();
   $scope.$digest();
 };
开发者ID:mizzy,项目名称:deck,代码行数:11,代码来源:dockerImageAndTagSelector.component.spec.ts

示例7:

 const initialize = (apiKey: string) => {
   $ctrl = $componentController('pagerDutyTag', { $scope: null }, { apiKey }) as PagerDutyTagComponentController;
   $ctrl.$onInit();
 };
开发者ID:emjburns,项目名称:deck,代码行数:4,代码来源:pagerDutyTag.component.spec.ts


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