Closed zimt28 closed 8 years ago
I think it depends on where you call it in your code, whether it has become present yet.
If you call ViewModel.addBinding
inside a hook of any kind, it will be present, because the hook won't be run until after Meteor is fully loaded, incl. all implied packages.
If you call it in some top-level package code, it may not be present if you only imply
'ed dalgard:viewmodel
. Instead, you can use
the package and be sure it will get injected properly.
P.S. It's great that you're using packages to organize your code :+1:
The solution is quite simple: I can't call ViewModel.addBinding
because ViewModel
is a reference to manuel's viewmodel :)
Oh, good. Feel free to create more issues in the future.
I structure all my code in packages. I have a
base-ui
package, which is used by all other packages andimply
sdalgard:viewmodel@0.5.9
. Everything seems to work, the only thing that doesn't is adding new bindings: