76 lines
1.8 KiB
Markdown
76 lines
1.8 KiB
Markdown
es5-ff-spa-loader
|
|
=========
|
|
|
|
A javascript library providing server defined loading of resources for a single page application.
|
|
|
|
## Installation
|
|
|
|
npm --save install es5-ff-spa-loader (TODO)
|
|
|
|
Then use the es5-ff-spa-loader.js in header as script resource or inline in body.
|
|
|
|
## Usage Mobile
|
|
|
|
Single index.html
|
|
|
|
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';
|
|
FFSpaLoader.start();
|
|
|
|
|
|
## Usage Web
|
|
|
|
Single index.html
|
|
|
|
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';
|
|
FFSpaLoader.start(function() {
|
|
console.log('FFExample.boot done');
|
|
});
|
|
|
|
## Usage Multi Server
|
|
|
|
Leave out the 'FFSpaLoader.options.server.url' option then the user will be promted to input
|
|
the server on first boot.
|
|
|
|
## Options
|
|
|
|
* options.debug.enable = Enable console debug output.
|
|
* TODO
|
|
|
|
## Example Application
|
|
|
|
There is a fully working express example application in the example folder.
|
|
|
|
## Tested Browsers
|
|
|
|
* Chromium 46
|
|
* Iceweasel 43
|
|
* Opera 12 Presto
|
|
* Android 5 in Cordova
|
|
|
|
## Todo
|
|
|
|
* Auto cache cleanup code.
|
|
* test in production
|
|
* Server header set+check support
|
|
* Redo css(?divs) of server question
|
|
* Add more tests
|
|
* css: set tag.media = 'only you';
|
|
* css: add media in resouces
|
|
* Add in browser tests
|
|
|
|
## 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
|