Hoodie goes angular in a cozy way!
A lot is missing, but the good news are: you can contribute!
A little bit about the plugin.
$ hoodie install angularjs in your project folder will install the plugin. You need to load angular BEFORE the hoodie-plugin.
hoodie module into angular and initialize hoodie.
Note: If you don't specify any url hoodie-angular will just fall back to the current URL.
There are currently four services. hoodie, hoodieAccount, hoodieStore and hoodieArray.
Use hoodieProvider.url(String) to configure your app's hoodie url at startup. Scroll down for an example.
You can then inject
hoodie with dependency injection anywhere to get your plain old hoodie instance. For more angular-friendly services, use the below.
Use the same API like plain hoodie. Use dependency Injection.
Use the same API like plain hoodie. Use dependency Injection if you want to use this. We recommend you to use
hoodieArray to your di-array. With the bind method you could bind an array to your hoodie store.
hoodieArray.bind(scope, store[, hoodieStore])
- scope: the scope to bind with. Normaly
- store: the place were the store binds to.
- hoodieStore: Optional. the store name in hoodie. If unset, store will be used.
hoodieObject to your di-array. With the bind method you could bind an object to your hoodie store.
- store: the place were the item is saved.
- id: the items id you want to bind to.
Returns an object with the item you selected from hoodie.
Install the development dependencies.
npm installbower install
gulp test to build and test once.
gulp to start the karma test server and run test continuously on every save.
Build & Release Process
gulp tag to prepare the built plugin for distribution.
Internally it does the following:
- Concat the source files and wrap them in Hoodie.extend()
- Move the built file from
distto the project root. (We keep the concatenated file in dist by default so it cannot be accidentally commited)
- Commit, tag, and Push