What is he doing! Array <string> = mean in angular?

I read the AngularJS documentation and found some type of parameter

!Array.<string>=

What does it mean? any answer will clarify the situation.

+4
source share
1 answer

Operators from Google Closure Type of expression .

  • ! identifies the type as "Non-nullable".
  • <...> identifies the content type of an object / collection.
  • = identifies the parameter as "Optional."

So, in the case of angular.module():

  • There are no arguments for requires.
  • When given, it cannot nulland must be Arraycontaining 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
+1
source

All Articles