angularjs - What is "[ ]" sign in angular.js? -


i trying find answer nothing found... in simple below codes:

var app = angular.module('myapp', [] ); 

i have never seen example using "[ ]" sign. for?

that dependencies array want module depend on.

so if need routing system so:

angular.module("app.module", ["ui.router"]); 

this says app.module depends on ui.router routing.

your example above declaring angular module no dependencies , assign variable app.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -