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
Post a Comment