當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。