目录搜索
AngularJS API Referenceautoauto/serviceauto/service/$injectorauto/service/$providengng/directiveng/directive/ang/directive/formng/directive/inputng/directive/input[checkbox]ng/directive/input[date]ng/directive/input[dateTimeLocal]ng/directive/input[email]ng/directive/input[month]ng/directive/input[number]ng/directive/input[radio]ng/directive/input[text]ng/directive/input[time]ng/directive/input[url]ng/directive/input[week]ng/directive/ngAppng/directive/ngBindng/directive/ngBindHtmlng/directive/ngBindTemplateng/directive/ngBlurng/directive/ngChangeng/directive/ngCheckedng/directive/ngClassng/directive/ngClassEvenng/directive/ngClassOddng/directive/ngClickng/directive/ngCloakng/directive/ngControllerng/directive/ngCopyng/directive/ngCspng/directive/ngCutng/directive/ngDblclickng/directive/ngDisabledng/directive/ngFocusng/directive/ngFormng/directive/ngHideng/directive/ngHrefng/directive/ngIfng/directive/ngIncludeng/directive/ngInitng/directive/ngKeydownng/directive/ngKeypressng/directive/ngKeyupng/directive/ngListng/directive/ngModelng/directive/ngModelOptionsng/directive/ngMousedownng/directive/ngMouseenterng/directive/ngMouseleaveng/directive/ngMousemoveng/directive/ngMouseoverng/directive/ngMouseupng/directive/ngNonBindableng/directive/ngOpenng/directive/ngPasteng/directive/ngPluralizeng/directive/ngReadonlyng/directive/ngRepeatng/directive/ngSelectedng/directive/ngShowng/directive/ngSrcng/directive/ngSrcsetng/directive/ngStyleng/directive/ngSubmitng/directive/ngSwitchng/directive/ngTranscludeng/directive/ngValueng/directive/scriptng/directive/selectng/directive/textareang/filterng/filter/currencyng/filter/dateng/filter/filterng/filter/jsonng/filter/limitTong/filter/lowercaseng/filter/numberng/filter/orderByng/filter/uppercaseng/functionng/function/angular.bindng/function/angular.bootstrapng/function/angular.copyng/function/angular.elementng/function/angular.equalsng/function/angular.extendng/function/angular.forEachng/function/angular.fromJsonng/function/angular.identityng/function/angular.injectorng/function/angular.isArrayng/function/angular.isDateng/function/angular.isDefinedng/function/angular.isElementng/function/angular.isFunctionng/function/angular.isNumberng/function/angular.isObjectng/function/angular.isStringng/function/angular.isUndefinedng/function/angular.lowercaseng/function/angular.moduleng/function/angular.noopng/function/angular.toJsonng/function/angular.uppercaseng/objectng/object/angular.versionng/providerng/provider/$animateProviderng/provider/$compileProviderng/provider/$controllerProviderng/provider/$filterProviderng/provider/$httpProviderng/provider/$interpolateProviderng/provider/$locationProviderng/provider/$logProviderng/provider/$parseProviderng/provider/$rootScopeProviderng/provider/$sceDelegateProviderng/provider/$sceProviderng/serviceng/service/$anchorScrollng/service/$animateng/service/$cacheFactoryng/service/$compileng/service/$controllerng/service/$documentng/service/$exceptionHandlerng/service/$filterng/service/$httpng/service/$httpBackendng/service/$interpolateng/service/$intervalng/service/$localeng/service/$locationng/service/$logng/service/$parseng/service/$qng/service/$rootElementng/service/$rootScopeng/service/$sceng/service/$sceDelegateng/service/$templateCacheng/service/$timeoutng/service/$windowng/typeng/type/$cacheFactory.Cacheng/type/$compile.directive.Attributesng/type/$rootScope.Scopeng/type/angular.Moduleng/type/form.FormControllerng/type/ngModel.NgModelControllerngAnimatengAnimate/providerngAnimate/provider/$animateProviderngAnimate/servicengAnimate/service/$animatengCookiesngCookies/servicengCookies/service/$cookiesngCookies/service/$cookieStorengMessagesngMessages/directivengMessages/directive/ngMessagengMessages/directive/ngMessagesngMockngMock/functionngMock/function/angular.mock.dumpngMock/function/angular.mock.injectngMock/function/angular.mock.modulengMock/objectngMock/object/angular.mockngMock/providerngMock/provider/$exceptionHandlerProviderngMock/servicengMock/service/$exceptionHandlerngMock/service/$httpBackendngMock/service/$intervalngMock/service/$logngMock/service/$timeoutngMock/typengMock/type/angular.mock.TzDatengMockE2EngMockE2E/servicengMockE2E/service/$httpBackendngResourcengResource/servicengResource/service/$resourcengRoutengRoute/directivengRoute/directive/ngViewngRoute/providerngRoute/provider/$routeProviderngRoute/servicengRoute/service/$routengRoute/service/$routeParamsngSanitizengSanitize/filterngSanitize/filter/linkyngSanitize/servicengSanitize/service/$sanitizengTouchngTouch/directivengTouch/directive/ngClickngTouch/directive/ngSwipeLeftngTouch/directive/ngSwipeRightngTouch/servicengTouch/service/$swipe
文字

AngularJS: API: ng/type/angular.Module


angular.Module

  1. - type in module ng

Interface for configuring angular modules.

方法

  • Provider(名称, providerType);

    参见 $provide.provider().

    参数

    参数 类型 详述
    name string

    service name

    providerType Function

    Construction function for creating new instance of the service.

  • factory(名称, providerFunction);

    参见 $provide.factory().

    参数

    参数 类型 详述
    name string

    service name

    providerFunction Function

    Function for creating new instance of the service.

  • Service(名称, constructor);

    参见 $provide.service().

    参数

    参数 类型 详述
    name string

    service name

    constructor Function

    A constructor function that will be instantiated.

  • value(名称, Object);

    参见 $provide.value().

    参数

    参数 类型 详述
    name string

    service name

    object *

    Service instance object.

  • constant(名称, Object);

    Because the constant are fixed, they get applied before other provide methods. See $provide.constant().

    参数

    参数 类型 详述
    name string

    constant name

    object *

    Constant value.

  • animation(名称, animationFactory);

    注意: animations take effect only if the ngAnimate module is loaded.

    Defines an animation hook that can be later used with $animate service and directives that use this service.

    module.animation('.animation-name', Function($inject1, $inject2) {
      return {
        eventName : Function(element, done) {
          //code to run the animation
          //once complete, then run done()
          return Function cancellationFunction(element) {
            //code to cancel the animation
          }
        }
      }
    })

    参见 $animateProvider.register() and ngAnimate module for more information.

    参数

    参数 类型 详述
    name string

    animation name

    animationFactory Function

    Factory function for creating new instance of an animation.

  • Filter(名称, filterFactory);

    参见 $filterProvider.register().

    参数

    参数 类型 详述
    name string

    Filter name.

    filterFactory Function

    Factory function for creating new instance of filter.

  • controller(名称, constructor);

    参见 $controllerProvider.register().

    参数

    参数 类型 详述
    name stringObject

    Controller name, or an object map of controllers where the keys are the names and the values are the constructors.

    constructor Function

    Controller constructor function.

  • Directive(名称, directiveFactory);

    参见 $compileProvider.directive().

    参数

    参数 类型 详述
    name stringObject

    Directive name, or an object map of directives where the keys are the names and the values are the factories.

    directiveFactory Function

    Factory function for creating new instance of directives.

  • config(configFn);

    Use this method to register work which needs to be performed on module loading. For more about how to configure services, see Provider Recipe.

    参数

    参数 类型 详述
    configFn Function

    Execute this function on module load. Useful for service configuration.

  • run(initializationFn);

    Use this method to register work which should be performed when the injector is done loading all modules.

    参数

    参数 类型 详述
    initializationFn Function

    Execute this function after injector creation. Useful for application initialization.

属性

  • requires

    Holds the list of modules which the injector will load before the current module is loaded.

  • 名称


上一篇:下一篇: