當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript angular.module函數代碼示例

本文整理匯總了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
開發者ID:aubrian-halili,項目名稱:red-cross,代碼行數:32,代碼來源:app.ts

示例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);
        }])
開發者ID:jchernandezr,項目名稱:pwm,代碼行數:31,代碼來源:main.ts

示例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,
);
開發者ID:emjburns,項目名稱:deck,代碼行數:28,代碼來源:scaleSettingsForm.component.ts

示例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 () {
開發者ID:prashanthc97,項目名稱:kylo,代碼行數:31,代碼來源:sticky-tabs.ts

示例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,
]);
開發者ID:brujoand,項目名稱:deck,代碼行數:13,代碼來源:isolatedTestingTargetStage.module.ts

示例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"
開發者ID:emjburns,項目名稱:deck,代碼行數:31,代碼來源:jenkins.artifact.ts

示例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;
開發者ID:BzenkoSergey,項目名稱:nc-demo,代碼行數:7,代碼來源:links.module.ts

示例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,
]);
開發者ID:mizzy,項目名稱:deck,代碼行數:11,代碼來源:checkPreconditionsStage.module.ts

示例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,
]);
開發者ID:emjburns,項目名稱:deck,代碼行數:10,代碼來源:createLoadBalancerStage.module.ts

示例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;
開發者ID:ermshiperete,項目名稱:web-languageforge,代碼行數:18,代碼來源:lexicon.module.ts


注:本文中的angular.module函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。