2
0
Fork 0
Find a file
2016-01-15 00:59:00 +01:00
example Fixed askUrl.urlTransport and updated readme a but 2016-01-15 00:59:00 +01:00
.gitignore Fixed example 2016-01-15 00:36:10 +01:00
.project Added lots op options 2016-01-14 22:42:13 +01:00
es5-ff-spa-loader.js Fixed askUrl.urlTransport and updated readme a but 2016-01-15 00:59:00 +01:00
package.json Added lots op options 2016-01-14 22:42:13 +01:00
README.md Fixed askUrl.urlTransport and updated readme a but 2016-01-15 00:59:00 +01:00

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 = true;
FFSpaLoader.options.server.url = 'http://myserver';
FFSpaLoader.options.server.urlPath = '/api/path/to/spa/client/resources';
FFSpaLoader.bootDevice(function() {
	FFSpaLoader.options.cache.factory = FFSpaLoader.autoSelectCache();// need deviceready via bootDevice for sqllite.
	FFSpaLoader.start(function() {
		console.log('FFExample.bootstrap angular');
		angular.bootstrap( $('body'), ['exampleUI']);
	});
});

Usage Web

Single index.html

FFSpaLoader.options.debug = true;
FFSpaLoader.options.server.url = '';
FFSpaLoader.options.server.urlPath = '/api/path/to/spa/client/resources';
FFSpaLoader.options.cache.factory = FFSpaLoader.autoSelectCache();
FFSpaLoader.start(function() {
	console.log('FFExample.bootstrap angular');
	angular.bootstrap( $('body'), ['exampleUI']);
});

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 console debug output.

Example Application

There is a fully working express example application in the example folder.

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