Been reading the AngularJS documentation and found some param type
!Array.<string>=
What does this mean? any answer would clear things up.
Been reading the AngularJS documentation and found some param type
!Array.<string>=
What does this mean? any answer would clear things up.
The operators are from Google Closure's Type Expressions.
! identifies the type as "Non-nullable."<...> identifies the type(s) of an object/collection's contents.= identifies the parameter as "Optional."So, in the case of angular.module():
requires.null and must be an Array containing only string values.angular.module('Foo'); // valid arguments
angular.module('Foo', null); // not valid
angular.module('Foo', ['Bar']); // valid
angular.module('Foo', [false]); // not valid
angular.module('Foo', function(){}); // valid
<...> represents the type of the contents/elements/etc., so Array<string> is an "array of strings."