christianalfoni / flux-angular

Use the FLUX architecture with Angular JS
313 stars 50 forks source link

Minifing with ngAnnotate #14

Closed WolfSoko closed 9 years ago

WolfSoko commented 9 years ago

When using ngAnnotate before minifing your code, stores are not detected by ngAnnotate. Therefore, when defining a store, we can use the ngInject annotation:


angular.module('xy').store(createStore);

/*@ngInject*/
function createStore(dep1,dep2,...){...}
slonoed commented 9 years ago

Its look like a problem for me. I use coffee, like this

angular.module 'mymodule'
.store (deps1, deps2) ->
    # some code

can we use .factory way in addition to .store way

christianalfoni commented 9 years ago

Hi guys,

Jups, flux.createStore, to be used in factory, is coming in the next version. It was indeed a bit too ambitious to only have the "store". Thanks for testing and pointing it out :-)

christianalfoni commented 9 years ago

Allrighty, new version is released :-)