Where is it best to handle the business logic in my Polymer app?
问题 So I've got a pure Polymer app. Currently, in some elements I have methods that call to my Firebase database, and handle related processing and whatnot, which I then <template repeat=...> into my element. This doesn't seem right, as it's encouraged that Polymer elements are reusable. I also do things like dependency injection e.g. <my-element app="{{app}}"> so I have access to global settings and such. What I end up with is a structure like: index.dart -> <my-app-as-an-element app=... ->