2015-12-22 20:41:40 +00:00
|
|
|
es5-ff-spa-loader
|
2015-12-23 00:16:54 +00:00
|
|
|
=========
|
|
|
|
|
2016-01-14 23:59:00 +00:00
|
|
|
A javascript library providing server defined loading of resources for a single page application.
|
2015-12-23 00:16:54 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2016-01-14 23:59:00 +00:00
|
|
|
npm --save install es5-ff-spa-loader (TODO)
|
2015-12-23 00:16:54 +00:00
|
|
|
|
2016-01-14 23:59:00 +00:00
|
|
|
Then use the es5-ff-spa-loader.js in header as script resource or inline in body.
|
2015-12-23 00:16:54 +00:00
|
|
|
|
2016-01-14 23:59:00 +00:00
|
|
|
## Usage Mobile
|
2015-12-23 00:16:54 +00:00
|
|
|
|
2016-01-14 23:59:00 +00:00
|
|
|
Single index.html
|
|
|
|
|
2016-01-16 17:24:37 +00:00
|
|
|
FFSpaLoader.options.debug.enable = true;
|
|
|
|
FFSpaLoader.options.boot.angular.modules.push('exampleUI');
|
2016-01-14 23:59:00 +00:00
|
|
|
FFSpaLoader.options.server.url = 'http://myserver';
|
2016-01-16 17:24:37 +00:00
|
|
|
FFSpaLoader.options.server.assets = '/api/path/to/spa/client/resources';
|
|
|
|
FFSpaLoader.start();
|
2016-01-14 23:59:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Usage Web
|
|
|
|
|
|
|
|
Single index.html
|
|
|
|
|
2016-01-16 17:24:37 +00:00
|
|
|
FFSpaLoader.options.debug.enable = true;
|
|
|
|
FFSpaLoader.options.boot.angular.modules.push('exampleUI');
|
|
|
|
FFSpaLoader.options.server.url = 'http://myserver';
|
|
|
|
FFSpaLoader.options.server.assets = '/api/path/to/spa/client/resources';
|
2016-01-14 23:59:00 +00:00
|
|
|
FFSpaLoader.start(function() {
|
2016-01-16 17:24:37 +00:00
|
|
|
console.log('FFExample.boot done');
|
2016-01-14 23:59:00 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
## Usage Multi Server
|
|
|
|
|
|
|
|
Leave out the 'FFSpaLoader.options.server.url' option then the user will be promted to input
|
|
|
|
the server on first boot.
|
2015-12-23 00:16:54 +00:00
|
|
|
|
|
|
|
## Options
|
|
|
|
|
2016-01-16 17:24:37 +00:00
|
|
|
* options.debug.enable = Enable console debug output.
|
|
|
|
* TODO
|
2015-12-23 00:16:54 +00:00
|
|
|
|
|
|
|
## Example Application
|
|
|
|
|
|
|
|
There is a fully working express example application in the example folder.
|
|
|
|
|
2016-01-16 17:24:37 +00:00
|
|
|
## Tested Browsers
|
|
|
|
|
|
|
|
* Chromium 46
|
|
|
|
* Iceweasel 43
|
|
|
|
* Opera 12 Presto
|
|
|
|
* Android 5 in Cordova
|
|
|
|
|
2015-12-23 00:16:54 +00:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
In lieu of a formal styleguide, take care to maintain the existing coding style.
|
|
|
|
Add unit tests for any new or changed functionality. Lint and test your code.
|
|
|
|
|
|
|
|
## Release History
|
|
|
|
|
|
|
|
### 0.1.x
|
|
|
|
* Initial release
|