Some time ago for angular
a certain degree of understanding, angular
the 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
jQuery
basis.
In the function module, angular
it 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.forEach
support 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.isUndefined
opposite result.
angular.isObject
It determines whether the parameter object.
Is different
typeof
,null
it 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
, +Infinity
as well -Infinity
.
angular.isDate
Check whether it's a date object.
angular.isArray
Array.isArray
Alias determine whether the array.
angular.isFunction
Determining whether a function.
angular.isElement
Determining whether the DOM
element or jQuery
elements.
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.equals
determination are equal - Both are
NaN
- Both regular expression, and the expression thereof is equal to
angular.bind
To bind function object. angular.bind
Similar function parameters in the form of call
methods.
Commonly used for currying and partial function.
angular.toJson
Turn JSON
style strings. This process can be called serialization.
angular.fromJson
A JSON
string restored, i.e. deserialization.
angular.bootstrap
Manually start AngularJS
the 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 jQuery
style wrapped DOM
elements or HTML String
. If not introduced jQuery
, is used angular
comes jqLite
simplified version. jqLite
Provided common jQuery API
to meet most of the cases.
angular.module
angular
The core, or get used to declare module.
angular.errorHandlingConfig
Misconfigured process.
So far, the angular
built-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 angular
doing inside knowledge a comprehensive introduction.
Generally speaking, this series corresponding Bowen
angular
's version1.6.x+
.
Some functions, such as angular.lowercase
, angular.uppercase
has been abandoned, therefore not listed here.
Original: Big Box angular function components Introduction