mn

0.0.1 • Public • Published

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'])

Readme

Keywords

none

Package Sidebar

Install

npm i mn

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • tehfreak