hunterloftis / knockout.namespaces Goto Github PK
View Code? Open in Web Editor NEWNamespaces plugin for KnockoutJS
Home Page: knockoutjs.com
Namespaces plugin for KnockoutJS
Home Page: knockoutjs.com
Hi,
Ran into an issue and to fix it you need to make sure there is an htmlString like so http://screencast.com/t/fq34i1biD if you want me to send a pull request let me know
Many thanks
Trying to use Knockout JavaScript library v1.3.0ctp - with knockout.namespaces - and catch this error ))
Can be used to implement namespaces with each one binding to separate contexts and having a different configuration
Does the namespacing work inside templates? The following code doesn't seem to be working:
<ul data-bind-users='template: { name : "UserTmpl", foreach: users }'></ul>
<script type='text/html' id='UserTmpl'>
<li>
<input type='text' data-bind-users='value: name' />
<p data-bind-users='text: name'></p>
</li>
</script>
You can find the complete example here: https://github.com/Enome/knockout.namespaces/blob/master/examples/simple.html which is a fork of your simple.html
Friendly Greetings
From looking at the templates.html example file, this should work, but for some reason, it doesn't.
In the global namespace, I render a template that has bindings for a namespace 'email' within it. These bindings for 'email' do not get attached. I have matching versions of jquery, jquery.tmpl, and knockout from the example in the repo. Let me know what other info you'd like for debugging and I'll send it over.
Knockout's applyBindingsToNode has changed significantly since 1.2. I didn't see an easy way to fix it, so I thought I'd at least log the issue here.
With the latest code, I get the error: 'Cannot call method 'slice' of undefined', which corresponds to this line: 'var namespace = arguments[6].slice(1);' I get this error when viewing the file templates.html within a cloned copy of the repo.
I found this while debugging a different issue related to templates.
just by including it: "Uncaught TypeError: undefined is not a function", last issue closed: 2011.
How do I use the non-global viewmodel in an {{IF}} block? For instance, in the code below, nested_children is a property on the unit view model, not the global view model. How do I get it to work?
{{if nested_children == false}}
<p> stuff </p>
{{else}}
<p> other stuff </p>
{{/if}}
Thanks!
Scott
When I load the plugin an error is thrown:
b.getBindingAttribute is not a function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.