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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -