Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Fix up documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jbueza committed Aug 30, 2012
1 parent 6e19782 commit 7da5f59
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions doc/api/Application.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Application

<pre><code>//mojo.create() returns you an application instance.
var app = mojo.create();</code></pre>
```javascript
//mojo.create() returns you an application instance.
var app = mojo.create();
```

## API

Expand All @@ -18,12 +20,14 @@ Provides the ability to set configurations for your Mojo application. At the mom

#### Usage

<pre><code>app
```javascript
app
.configure('appSrc', 'js/')
.configure('locale', 'en_US') // locale aware applications! (load different languages)
.configure('environment', 'prod') // dev or prod for debugging mode!
.configure('pluginSrc', 'js/lib/plugins/') // setup plugins location directory
.configure('plugins', ['jqmodal', 'jcarousel']) // automagically fetch my jQuery plugins!</code></pre>
.configure('plugins', ['jqmodal', 'jcarousel']) // automagically fetch my jQuery plugins!
```

### map(selector, callback)

Expand All @@ -45,14 +49,6 @@ Provides the ability to unbind all controllers from all contexts, as well as, pr

Provides the ability to map all DOM elements to Controllers based on your bootstrap JavaScript file (typically called app.js). Developers can call this if they (for some reason) want to remap controllers--This isn't recommended as you can use event delegation instead through your Event Map.

### on(eventName, callback)

N/A (Future)

### getPlugins(onComplete)

Provides the ability to fetch all application-specific plugins prior to starting the application. This method piggybacks off of mojo.require() to fetch the plugins.

### start()

Starts your application by binding all DOM contexts to controllers and connecting all commands to controllers.

0 comments on commit 7da5f59

Please sign in to comment.