hunterloftis / knockout.namespaces

Namespaces plugin for KnockoutJS
knockoutjs.com
57 stars 5 forks source link

Doesn't work #1

Closed thelinuxlich closed 13 years ago

thelinuxlich commented 13 years ago

When I load the plugin an error is thrown:

b.getBindingAttribute is not a function

hunterloftis commented 13 years ago

It will work as soon as this pull request is merged:

https://github.com/SteveSanderson/knockout/pull/75

Steve asked me to convert to a plugin instead of a core merge, but it needs that hook (getBindingAttribute) first to work as a plugin. I'm happy you're trying it out! You can pull from here to get KO with the hook:

https://github.com/hunterloftis/knockout

hunterloftis commented 13 years ago

Thanks for pointing out to me that this hasn't been merged yet into the main branch. I added a notice to the readme on namespaces so I won't confuse anyone else.

thelinuxlich commented 13 years ago

Now I'm using your knockout fork and a new error is thrown:

b.utils.getElementsHavingAttribute is not a function

hunterloftis commented 13 years ago

Well damn okay let me take a look - thanks! =)

hunterloftis commented 13 years ago

I see the issue - I built/tested it with latest.debug.js (both), and when it's using the minified/compressed version, some of the objects I'm accessing have compressed names!

Thanks for this, I'll fix it and also include a test/demo with .namespaces to make trying it easier.

thelinuxlich commented 13 years ago

Thanks Hunter :)

thelinuxlich commented 13 years ago

Now it works!

hunterloftis commented 13 years ago

Fixed by adding 2 hooks to:

https://github.com/hunterloftis/knockout

...but you don't need to download that, I've included it in /support now, so you should be able to just pull and open /examples/simple.html to get started.

robertohuertasm commented 12 years ago

Hi, I'm using knockout version 2.0 and I'm trying to use namespaces but I continously get this error. What should I do? I tried the simple example pointing to new ko library and it fails too. Thanks!