Questions tagged [jsviews]

JsViews: Next-generation MVVM framework created and maintained by Boris Moore. Do NOT use this tag for questions about "JS views" in SAPUI5.

JsViews

Next-generation MVVM framework - bringing templates to life. Integrates with JsRender.

The JsViews framework brings declarative data-binding to JsRender templates, supports MVVM and MVP (custom tag controls), and much more...

Currently in pre-beta (could still have a few breaking changes in more advanced APIs).

See also on GitHub: https://github.com/BorisMoore/jsviews

JsRender can also be used stand-alone, without JsViews, and with or without jQuery:

209 questions
25
votes
3 answers

Difference between jsRender and jsViews

So jQuery templates will never get past beta and jsRender and jsViews are supposed to fill the void. I checked out the examples posted by Boris Moore on this page but I don't get the difference between jsRender and jsViews. Moreover Boris has used…
Juzer Ali
  • 4,109
  • 3
  • 35
  • 62
6
votes
2 answers

JsViews how to make data binding happen on root object as well as its nested properties?

I am experiencing odd behavior when data linking an object to a form that led me to re-question what exactly is being data bound? Basically I have a form that creates new Companies as well as updates them. The actual creation/update is done via…
Parth Shah
  • 2,060
  • 1
  • 23
  • 34
5
votes
1 answer

jsrender/ jsviews: how to loop a selected object list?

How can I loop a selected group/ object list only from my json data? For instance, I just want to loop "ID2" in the example below, json, { "ID1": { "items":{ "0": "VALUE1", "1": "VALUE2", "2": "VALUE3", …
Run
  • 54,938
  • 169
  • 450
  • 748
4
votes
1 answer

How can I load data from jsrender template and update it

I'm working on migrating Jquery template with JSRender library. I need to retrieve data object from the template page and after that I need to update corresponding property. My old jquery.tmpl code is given below: JavaScript function…
Vignesh VS
  • 921
  • 1
  • 14
  • 30
3
votes
1 answer

How to change JsRender template tags?

I use Twig. It uses these tags: {{ name }} I want to include JsRender in my project. But JsRender also uses the same tags {{:name}}, so there is a conflict and nothing works. How to change default JsRender tags with custom tags, say Ruby-like <%=…
Green
  • 28,742
  • 61
  • 158
  • 247
3
votes
2 answers

JsRender/ JsViews: how to loop a nested json?

How can I loop a nested json like this below with jsrender/ jsviews? var data = { nested: { page: { type: "X", items: { "0":{"title":"page - hello"}, "1":{"title":"page - world"} …
Run
  • 54,938
  • 169
  • 450
  • 748
3
votes
1 answer

Change the scope of onAfterChange in jsViews

I have very nested data, so I added a {{scope variable}}...{{/scope}} tag, which does nothing but changing the scope: scope: function (newScope) { return this.tagCtx.render(newScope); } This works so far, but this sample code has an issue in…
neo post modern
  • 2,262
  • 18
  • 30
2
votes
1 answer

Need help using JsObservable with TypeScript?

I already worked with JSRender, JSViews and JSObservables in the past. This time, I started a new project but using TypeScript and I am not sure how to use it... I find very confusing where to put the references to .js, .d.ts, .ts... Could I…
ClaudeVernier
  • 427
  • 4
  • 20
2
votes
0 answers

jsRender and isotope

I am trying to get jsRender and isotope working together, however I cannot get them working together after rendering. If I remove the template and use raw html, isotope works just fine: At page load, I show some "holding posts" which just have some…
grayson
  • 945
  • 1
  • 11
  • 28
2
votes
1 answer

Data-binding in JsViews

I have a Javascript object literal like test : { length: 3, text: "Please enter 3 characters" } I want to make the text rendered dynamic based on length, something like this test : { length: 3, text: "Please enter {{:length}}…
user1776573
  • 281
  • 1
  • 3
  • 12
2
votes
1 answer

how to link base type variable in JsViews custom tag

I use JsViews + spectrumjs colorpicker and i had to create custom tag like this: $.views.tags({ spectrum : { template : "", onAfterLink : function (tagCtx, linkCtx) { var tag = this; var props =…
Noneme
  • 816
  • 6
  • 22
2
votes
3 answers

How to check array null or empty in jsrender?

This is My Code below Whenever the value…
S.Raaj Nishanth
  • 242
  • 2
  • 15
1
2 3
13 14