Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@quentinsup
Copy link

Hi,

Here two functionnalities with minor changes.

  • Use multi-templateEngine

As it is only possible to have only one templateEngine, i've add a functionnality to define which templateEngine using a contentType description.

<script id="template-test" type="text/ko-template"> // use native templating </script>

<script id="template-test" type="text/jquery-tmpl"> // use jquery-tmpl </script>

<script id="template-test" type="text/custom-tmpl"> // use a custom templateEngine with "text/custom-tmpl" as contentType </script>

The way to set the global templateEngine is still the same (as jquery-tmpl autoset if exists)

  • Personnalize data binding attribute name

As default knockout binding attribute name is 'data-bind', i've add a way to modify it and use another attribute name, through bindingProvider method

ko.bindingProvider.instance.setBindingAttributeName('data-app');

<input data-app="..." />

I'm waiting for your feedback !

Add TemplateEngineContentType which can switch templateEngine depends on a contentType
Use text/ko-template to define the nativeTemplateEngine
Use text/jquery-tmpl to use this templateEngine
setBindingAttributeName of the bindingProvider instance can change default data binding attribute 'data-bind'
Take account the data binding attribute name set from bindingProvider
Remove trailing spaces
Remove trailing spaces
Remove trailing spaces
Remove trailing spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant