本文整理汇总了TypeScript中angular.module函数的典型用法代码示例。如果您正苦于以下问题:TypeScript module函数的具体用法?TypeScript module怎么用?TypeScript module使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了module函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
import main from './main/main.component';
import constants from './app.constants';
import util from '../components/util/util.module';
import socket from '../components/socket/socket.service';
import './app.less';
angular.module('tempApp', [
ngCookies,
ngResource,
ngSanitize,
'btford.socket-io',
uiRouter,
uiBootstrap,
navbar,
footer,
main,
constants,
socket,
util
])
.config(routeConfig)
;
angular
.element(document)
.ready(() => {
angular.bootstrap(document, ['tempApp'], {
strictDi: true
示例2: require
import { bootstrap, module } from 'angular';
import ConfigService from './services/config.service';
import peopleSearchModule from './peoplesearch/peoplesearch.module';
import PeopleService from './services/people.service';
import PwmService from './services/pwm.service';
import routes from './routes';
import routeErrorHandler from './route-error-handler';
import TranslationsLoaderFactory from './services/translations-loader.factory';
import uiRouter from '@uirouter/angularjs';
// fontgen-loader needs this :(
require('./icons.json');
module('app', [
uiRouter,
peopleSearchModule,
'pascalprecht.translate'
])
.config(routes)
.config([
'$translateProvider',
($translateProvider: angular.translate.ITranslateProvider) => {
$translateProvider
.translations('fallback', require('i18n/translations_en.json'))
.useLoader('translationsLoader')
.useSanitizeValueStrategy('escapeParameters')
.preferredLanguage('en')
.fallbackLanguage('fallback')
.forceAsyncReload(true);
}])
示例3: module
import { IComponentOptions, module } from 'angular';
const kubernetesScaleManifestSettingsFormComponent: IComponentOptions = {
bindings: { settings: '=' },
controllerAs: 'ctrl',
template: `
<div class="form-horizontal">
<div class="form-group form-inline">
<div class="col-md-3 sm-label-right">
Replicas
</div>
<div class="col-md-4">
<input type="text"
class="form-control input-sm highlight-pristine"
ng-model="ctrl.settings.replicas"
min="0"/>
</div>
</div>
</div>
`,
};
export const KUBERNETES_SCALE_MANIFEST_SETTINGS_FORM =
'spinnaker.kubernetes.v2.kubernetes.manifest.scale.settingsForm.component';
module(KUBERNETES_SCALE_MANIFEST_SETTINGS_FORM, []).component(
'kubernetesScaleManifestSettingsForm',
kubernetesScaleManifestSettingsFormComponent,
);
示例4: function
import * as angular from "angular";
import {moduleName} from "../module-name";
import BroadcastConstants from "../../services/BroadcastConstants";
angular.module(moduleName).directive("stickyTabs",
["$window","$compile","BroadcastService", ($window, $compile, BroadcastService) => {
return {
link: function ($scope: any, element: any, attrs: any) {
element.addClass('sticky');
element.prepend('<div class="sticky-anchor"></div>');
var tabsWrapper = element.find('md-tabs-wrapper');
tabsWrapper.css('z-index', 49);
var header = angular.element('.page-header');
header.css('z-index', 60);
var side = angular.element('md-sidenav');
side.css('z-index', 61);
tabsWrapper.css('position','absolute');
//tabsWrapper.css('width','100%');
var width = angular.element('#content').width();
if(width == 0){
width = angular.element($window).width() - side.width();
}
tabsWrapper.css('width',width+'px');
var tabsContentWrapper = element.find('md-tabs-content-wrapper');
tabsContentWrapper.css('margin-top','80px');
var headerHeight = header.height();
angular.element($window).on("resize.stickytab", function () {
示例5: module
import {module} from 'angular';
import {ACCOUNT_SERVICE} from 'core/account/account.service';
import {NAMING_SERVICE} from 'core/naming/naming.service';
import {ISOLATED_TESTING_TARGET_STAGE} from './isolatedTestingTargetStage';
export const ISOLATED_TESTING_TARGET_STAGE_MODULE = 'spinnaker.netflix.pipeline.stage.isolatedTestingTarget';
module(ISOLATED_TESTING_TARGET_STAGE_MODULE, [
ISOLATED_TESTING_TARGET_STAGE,
ACCOUNT_SERVICE,
NAMING_SERVICE,
]);
示例6: module
import { module } from 'angular';
import { ArtifactTypePatterns } from 'core/artifact';
import { IArtifact } from 'core/domain/IArtifact';
import { Registry } from 'core/registry';
export const JENKINS_ARTIFACT = 'spinnaker.core.pipeline.trigger.jenkins.artifact';
module(JENKINS_ARTIFACT, []).config(() => {
Registry.pipeline.mergeArtifactKind({
label: 'Jenkins',
typePattern: ArtifactTypePatterns.JENKINS_FILE,
type: 'jenkins/file',
description: 'A Jenkins artifact file.',
key: 'jenkins',
isDefault: false,
isMatch: true,
controller: function(artifact: IArtifact) {
this.artifact = artifact;
this.artifact.type = 'ivy/file';
},
controllerAs: 'ctrl',
template: `
<div class="col-md-12">
<div class="form-group row">
<label class="col-md-2 sm-label-right">
File path
<help-field key="pipeline.config.expectedArtifact.git.name"></help-field>
</label>
<div class="col-md-8">
<input type="text"
placeholder="manifests/frontend.yaml"
示例7:
import * as angular from 'angular';
import component from './links.component.ts';
let module = angular.module('portal.sidebar.links', []);
module.component('portalSidebarLinks', component);
export default module;
示例8: module
import { module } from 'angular';
import { CHECK_PRECONDITIONS_STAGE } from './checkPreconditionsStage';
import { STAGE_CORE_MODULE } from '../core/stage.core.module';
export const CHECK_PRECONDITIONS_STAGE_MODULE = 'spinnaker.pipelines.stage.checkPreconditions';
module(CHECK_PRECONDITIONS_STAGE_MODULE, [
require('../stage.module.js').name,
STAGE_CORE_MODULE,
CHECK_PRECONDITIONS_STAGE,
]);
示例9: module
import { module } from 'angular';
import { CREATE_LOAD_BALANCER_EXECUTION_DETAILS_CTRL } from './createLoadBalancerExecutionDetails.controller';
export const CREATE_LOAD_BALANCER_STAGE = 'spinnaker.core.pipeline.stage.createLoadBalancer';
module(CREATE_LOAD_BALANCER_STAGE, [
require('./createLoadBalancerStage').name,
CREATE_LOAD_BALANCER_EXECUTION_DETAILS_CTRL,
]);
示例10:
import * as angular from 'angular';
import 'angular-sanitize';
import {InputSystemsModule} from '../../bellows/core/input-systems/input-systems.service';
import {SoundModule} from '../../bellows/shared/sound.module';
import {LexiconCoreModule} from './core/lexicon-core.module';
import {LexiconEditorModule} from './editor/editor.module';
import {LexiconSettingsModule} from './settings/settings.module';
export const LexiconModule = angular
.module('lexiconModule', [
InputSystemsModule,
LexiconCoreModule,
LexiconEditorModule,
LexiconSettingsModule,
SoundModule
])
.name;