angular function components Introduction

Some time ago for angulara certain degree of understanding, angularthe series went from Benpian Bowen started. In this paper, its function components do provide an entry-level introduction. Most documents directly translated from the official document: Function Components in ng .

Read this article requires a certain jQuerybasis.

In the function module, angularit provides many of the features easy to use, I will be following in the order of 11 to do an official document presentation.

angular.forEach

Through the array or object. Similar functions jQuery.each. The difference is angular.forEachsupport to pass in a context as the third argument: angular.forEach(obj, iterator, [context]);.

angular.extend

Extension object. Function is similar jQuery.extend, but here is a shallow copy.

angular.merge

Combine objects, the depth of the merger can be regarded as a deep copy.

angular.noop

Air operations, function () {}namely: .

angular.identity

Returns the first parameter itself, for functional programming.

angular.isUndefined

Determine whether the parameters undefined.

angular.isDefined

Determining whether the parameters are defined before, with the angular.isUndefinedopposite result.

angular.isObject

It determines whether the parameter object.

Is different typeof, nullit will be treated as non-objects, arrays as objects.

angular.isString

It determines whether the parameter is a string.

angular.isNumber

Determining parameter is an array, comprises NaN, +Infinityas well -Infinity.

angular.isDate

Check whether it's a date object.

angular.isArray

Array.isArrayAlias ​​determine whether the array.

angular.isFunction

Determining whether a function.

angular.isElement

Determining whether the DOMelement or jQueryelements.

angular.copy

Copy an object or an array of deep copy.

angular.equals

Analyzing two parameters are equal.

Meets one of the following conditions are considered equal:

  • By strict equality ===of determination
  • The same type of object and all of its attributes angular.equalsdetermination are equal
  • Both areNaN
  • Both regular expression, and the expression thereof is equal to

angular.bind

To bind function object. angular.bindSimilar function parameters in the form of callmethods.

Commonly used for currying and partial function.

angular.toJson

Turn JSONstyle strings. This process can be called serialization.

angular.fromJson

A JSONstring restored, i.e. deserialization.

angular.bootstrap

Manually start AngularJSthe application.

angular.reloadWithDebugInfo

In debug mode overload current application.

angular.injector

Declaration and use of the injection device. Details can be found: dependency Injection

angular.element

With jQuerystyle wrapped DOMelements or HTML String. If not introduced jQuery, is used angularcomes jqLitesimplified version. jqLiteProvided common jQuery APIto meet most of the cases.

angular.module

angularThe core, or get used to declare module.

angular.errorHandlingConfig

Misconfigured process.


So far, the angularbuilt-in function to sort finished components. For more detail, please review the party of self-related documents.

Inside the next spare time, will gradually against angulardoing inside knowledge a comprehensive introduction.

Generally speaking, this series corresponding Bowen angular's version 1.6.x+.


Some functions, such as angular.lowercase, angular.uppercasehas been abandoned, therefore not listed here.

Original: Big Box  angular function components Introduction


Guess you like

Origin www.cnblogs.com/petewell/p/11597437.html