本文整理汇总了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';
}));
示例2:
const initializeController = (data: any) => {
$ctrl = $componentController(
'chaosMonkeyExceptions',
{ $scope: null, $q },
data,
) as ChaosMonkeyExceptionsController;
};
示例3:
const initialize = () => {
ctrl = $componentController(
'deployInitializer',
{},
{ application, command: { viewState: {} }, cloudProvider: 'aws' },
) as DeployInitializerController;
ctrl.$onInit();
};
示例4:
const initialize = () => {
$ctrl = $componentController(
'awsMetricSelector',
{ $scope },
{ alarm, serverGroup, alarmUpdated },
) as MetricSelectorController;
$ctrl.$onInit();
};
示例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));
};
示例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();
};
示例7:
const initialize = (apiKey: string) => {
$ctrl = $componentController('pagerDutyTag', { $scope: null }, { apiKey }) as PagerDutyTagComponentController;
$ctrl.$onInit();
};