Irrelon/ForerunnerDB

Integrate with AngularJS

Closed this issue · 10 comments

Would love to have this work with AngularJS

It's definitely something I want to happen. Any chance you can detail how you'd like the integration to work / how you envisage the interaction between Angular and Forerunner? I'm going to be looking into an Angular mashup soon :)

It's as simple as to make Forerunner a service so I can call it from within controller

Also take a look at ngStorage implementation

https://github.com/gsklee/ngStorage

Ahh I see! That's pretty cool and easy to do. I'll sort it out in an upcoming release, thanks for the feedback! :)

This feature is now on the roadmap due in version 1.3.0.

yeah, that would be awesome, and agreed just like ngstorage would be sweet

👍

Please, make it (un-)pluggable, so I can drop it, if I don't need it.

Don't worry, almost all of Forerunner's functionality is modular anyway. The main part of this modularity becoming useful to the end user (such as yourself) will be the inclusion of a build page that allows modules to be selected and a build produced. Forerunner was built with that in mind so it will be quite easy to put that page together.

AngularJS support is now available and we are using it in a real-world app using ionic to give it a proper battle test.

We'll be updating the documentation to include an AngularJS section shortly.

The AngularJS support currently allows you to bind a collection or view to a model name that is then accessible in the passed scope. This allows you to use ForerunnerDB methods to do CRUD operations on your data which are then automatically reflected on your views.

The data can also optionally update automatically in the opposite direction so data in text entry fields or whatever can be edited by the user and reflected back to ForerunnerDB.

Since AngularJS is so popular we will continue to support integration and take feedback and input for the plugin to help make it the best it can be. An example ionic app will be made available as well to demonstrate how to use the integration.

OK the documentation on the dev branch has been updated with an angularjs section explaining how to use the forerunnerdb service.

An example Ionic app is also available in the repo.