mn
v0.0.1
Published
MomentumJS is a structural framework for advanced web apps.
Downloads
12
Readme
MomentumJS
MomentumJS is a structural framework for advanced web apps.
v0.0.1 — Proof of Concept
Usage
var mn= require('mn')
Reference
mn.module
The mn.module
is a global place for creating and registering Momentum modules. All modules (momentum core or 3rd party) that should be available to an application must be registered using this mechanism.
Module
A module is a collocation of services and configuration information. Module is used to configure the injector
.
// Create a new module
var myModule= mn.module('myModule', []);
// register a new service
myModule.value('appName', 'MyCoolApp');
// configure existing services inside initialization blocks.
myModule.config(function($appProvider) {
// Configure existing providers
$appProvider.setConfig(...)
});
Then you can create an injector and load your modules like this:
var injector= mn.injector(['mn', 'MyModule'])