# CanJS

**URL:** https://forums.bitovi.com/c/canjs/6.md

[Latest](https://forums.bitovi.com/latest.md) · [Categories](https://forums.bitovi.com/categories.md) · [Tags](https://forums.bitovi.com/tags.md)

---

## [About the CanJS category](https://forums.bitovi.com/t/about-the-canjs-category/20)

<div class="topic-metadata">

**Author:** [@matthewp](https://forums.bitovi.com/u/matthewp)\
**Replies:** 0

</div>

Discuss DoneJS’s MV\* framework CanJS here. File bugs and feature requests on GitHub. Use CodePen to make examples. Want to chat? Join our Slack, then head over to the #canjs channel.

---

## [Is CanJS 1.1.7 compatible with Jquery 3.6?](https://forums.bitovi.com/t/is-canjs-1-1-7-compatible-with-jquery-3-6/1134)

<div class="topic-metadata">

**Author:** [@Ronald\_Torres](https://forums.bitovi.com/u/Ronald_Torres)\
**Replies:** 0\
**Last updated:** [August 26, 2022, 7:59am UTC](https://forums.bitovi.com/t/is-canjs-1-1-7-compatible-with-jquery-3-6/1134 "2022-08-26T07:59:47Z")

</div>

i just wanna ask if CanJS 1.1.7 compatible with Jquery 3.6?. Thanks

---

## [Migrating from CanJS 1.1.7 to current](https://forums.bitovi.com/t/migrating-from-canjs-1-1-7-to-current/1087)

<div class="topic-metadata">

**Author:** [@Francisco\_Imperio](https://forums.bitovi.com/u/Francisco_Imperio)\
**Replies:** 6\
**Last updated:** [March 23, 2022, 4:41pm UTC](https://forums.bitovi.com/t/migrating-from-canjs-1-1-7-to-current/1087 "2022-03-23T16:41:59Z")

</div>

Hello. I have a mature application that is using CanJS 1.1.7. I would like to upgrade to the current version of CanJS. What are the steps to do that? Regards, Francisco

---

## [Templated Event Bindings](https://forums.bitovi.com/t/templated-event-bindings/87)

<div class="topic-metadata">

**Author:** [@thecountofzero](https://forums.bitovi.com/u/thecountofzero)\
**Replies:** 22\
**Last updated:** [December 31, 2015, 1:57am UTC](https://forums.bitovi.com/t/templated-event-bindings/87 "2015-12-31T01:57:02Z")

</div>

In "events" of a can.Component, is it possible to do the following: "{getSomething} click": function(el, ev) { ..... } Where "getSomething" is a property on the component's viewModel, but it is a function that return…

---

## [ndjsonSteam Cancel](https://forums.bitovi.com/t/ndjsonsteam-cancel/1114)

<div class="topic-metadata">

**Author:** [@paul](https://forums.bitovi.com/u/paul)\
**Replies:** 1\
**Last updated:** [December 24, 2020, 1:46am UTC](https://forums.bitovi.com/t/ndjsonsteam-cancel/1114 "2020-12-24T01:46:16Z")

</div>

In the docs there is an example using ndjsonStream with fetch (below). I’m wondering if someone could inform me how/where to cancel the stream from the front-end? For example, if I have a dropdown that calls fetch on cha…

---

## [Textbox values are not escaped when template contains multiple textboxes bound to same model](https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108)

<div class="topic-metadata">

**Author:** [@dthorpe](https://forums.bitovi.com/u/dthorpe)\
**Replies:** 1\
**Last updated:** [July 2, 2020, 8:06pm UTC](https://forums.bitovi.com/t/textbox-values-are-not-escaped-when-template-contains-multiple-textboxes-bound-to-same-model/1108 "2020-07-02T20:06:32Z")

</div>

Using version 2.3.28, I have a form with several text boxes with 'value’s bound to an attribute on a model. On submission of the form, I call attr(formParams) on the model, which causes a loop through the bound textboxes…

---

## [CanJS after 6.0](https://forums.bitovi.com/t/canjs-after-6-0/1101)

<div class="topic-metadata">

**Author:** [@phillipskevin](https://forums.bitovi.com/u/phillipskevin)\
**Replies:** 1\
**Last updated:** [January 24, 2020, 9:42am UTC](https://forums.bitovi.com/t/canjs-after-6-0/1101 "2020-01-24T09:42:37Z")

</div>

Now that the dust has settled after the CanJS 6.0 release, I wanted to start a discussion around the goals for CanJS in 2020. The goal of this post is to start a discussion, not to make any final decisions. We’ll likely…

---

## [Upgraded from canjs 2.2.5 to canjs 2.3.28 and jquery v1.11.3 to jquery v3.4.1 and select box selection is not working](https://forums.bitovi.com/t/upgraded-from-canjs-2-2-5-to-canjs-2-3-28-and-jquery-v1-11-3-to-jquery-v3-4-1-and-select-box-selection-is-not-working/1100)

<div class="topic-metadata">

**Author:** [@smoothlikejazz](https://forums.bitovi.com/u/smoothlikejazz)\
**Replies:** 2\
**Last updated:** [January 17, 2020, 5:08pm UTC](https://forums.bitovi.com/t/upgraded-from-canjs-2-2-5-to-canjs-2-3-28-and-jquery-v1-11-3-to-jquery-v3-4-1-and-select-box-selection-is-not-working/1100 "2020-01-17T17:08:37Z")

</div>

@justinbmeyer We have a helper function which creates the select box based on observe array of label-value pairs \[{“label”: “”, value:“”}, {“label”: “”, value:“”}\] and it also calls $option.attr(“selected”, “selected”) a…

---

## [Were upgrading jquery from v1.11.3 to v3.4.1 and were getting buildFragment error using canjs version 2.2.5](https://forums.bitovi.com/t/were-upgrading-jquery-from-v1-11-3-to-v3-4-1-and-were-getting-buildfragment-error-using-canjs-version-2-2-5/1097)

<div class="topic-metadata">

**Author:** [@smoothlikejazz](https://forums.bitovi.com/u/smoothlikejazz)\
**Replies:** 3\
**Last updated:** [December 21, 2019, 12:24am UTC](https://forums.bitovi.com/t/were-upgrading-jquery-from-v1-11-3-to-v3-4-1-and-were-getting-buildfragment-error-using-canjs-version-2-2-5/1097 "2019-12-21T00:24:05Z")

</div>

We have a huge application built on canjs with more than 250 screens Current jQuery Version: v1.11.3 Need to upgrade JQuery to: v3.4.1 Our current canjs version: 2.2.5 Our current steal version: 0.11.4 Which versi…

---

## [Live Bindings intermittently stops working completely](https://forums.bitovi.com/t/live-bindings-intermittently-stops-working-completely/1094)

<div class="topic-metadata">

**Author:** [@smoothlikejazz](https://forums.bitovi.com/u/smoothlikejazz)\
**Replies:** 8\
**Last updated:** [December 20, 2019, 8:49pm UTC](https://forums.bitovi.com/t/live-bindings-intermittently-stops-working-completely/1094 "2019-12-20T20:49:10Z")

</div>

Hi members, We are currently running into an issue that is extremely hard to debug, I just know at some point all the live bindings in our application fail to trigger. Has anyone run into such a case, what could make a…

---

## [Faking synchronous AJAX can.view helper from 2.3](https://forums.bitovi.com/t/faking-synchronous-ajax-can-view-helper-from-2-3/1092)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [October 14, 2019, 8:12pm UTC](https://forums.bitovi.com/t/faking-synchronous-ajax-can-view-helper-from-2-3/1092 "2019-10-14T20:12:47Z")

</div>

In slack, a community member asked how to make the old can.view(url) work. Example: var view = can.view("/path/to/view.stache"); In 6.0, due to the removal of NodeLists making something like this work in a memory-safe…

---

## [Latest can-assign release is breaking build](https://forums.bitovi.com/t/latest-can-assign-release-is-breaking-build/1070)

<div class="topic-metadata">

**Author:** [@jfleming](https://forums.bitovi.com/u/jfleming)\
**Replies:** 2\
**Last updated:** [May 28, 2019, 12:31am UTC](https://forums.bitovi.com/t/latest-can-assign-release-is-breaking-build/1070 "2019-05-28T00:31:22Z")

</div>

The latest release of can-assign@1.3.2 is breaking our build when using DoneJS 0.9 node\_modules\\steal-systemjs\\dist\\system.src.js:629 throw new Error('Unable to load dependency ' + name + '.'); ^ Error:…

---

## [Pass a template into a component](https://forums.bitovi.com/t/pass-a-template-into-a-component/1063)

<div class="topic-metadata">

**Author:** [@robfoweraker](https://forums.bitovi.com/u/robfoweraker)\
**Replies:** 2\
**Last updated:** [March 29, 2019, 7:27am UTC](https://forums.bitovi.com/t/pass-a-template-into-a-component/1063 "2019-03-29T07:27:12Z")

</div>

Hi, Is it possible to pass a stache template into a component as an attribute? I’m thinking of a modal dialog component, where the actual form displayed within the component is passed in as an attribute of the componen…

---

## [Using \`value\` to get rid of imperative functions](https://forums.bitovi.com/t/using-value-to-get-rid-of-imperative-functions/1061)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [March 21, 2019, 7:37pm UTC](https://forums.bitovi.com/t/using-value-to-get-rid-of-imperative-functions/1061 "2019-03-21T19:37:53Z")

</div>

The following creates a Todo and when saved, replaces it with another todo: Component.extend({ tag: "todos-app", view: \` \<input placeholder="What needs to be done?" value:bind="this.newName" /\> …

---

## [Partial bindings application](https://forums.bitovi.com/t/partial-bindings-application/1046)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 1\
**Last updated:** [February 28, 2019, 7:48pm UTC](https://forums.bitovi.com/t/partial-bindings-application/1046 "2019-02-28T19:48:57Z")

</div>

The following is a rough example of how to “forward” binding from one element onto another element. Specifically it moves the placeholder, and value bindings from \<my-input placeholder:from='placeholder' other:from='num…

---

## [Use \`can-bind\` directly when not using \`can-stache-bindings\`](https://forums.bitovi.com/t/use-can-bind-directly-when-not-using-can-stache-bindings/1042)

<div class="topic-metadata">

**Author:** [@Mike\_Mitchel](https://forums.bitovi.com/u/Mike_Mitchel)\
**Replies:** 0\
**Last updated:** [February 19, 2019, 4:26pm UTC](https://forums.bitovi.com/t/use-can-bind-directly-when-not-using-can-stache-bindings/1042 "2019-02-19T16:26:24Z")

</div>

I had a situation where I needed to bind a property between two observables (essentially two top level appStates) that did not have a .stache file associated to do the binding. I learned you can code what can-stache-bind…

---

## [Upgrading 2.3's can/control/route](https://forums.bitovi.com/t/upgrading-2-3s-can-control-route/1008)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 7\
**Last updated:** [January 31, 2019, 9:28pm UTC](https://forums.bitovi.com/t/upgrading-2-3s-can-control-route/1008 "2019-01-31T21:28:39Z")

</div>

From this gitter thread … @tracer99 asked how to upgrade code like this: '/:service route': function(urlContext) { this.login(urlContext); if (urlContext.service == 'logout') { …

---

## [How to get your packages right (for example, upgrading from 3.0 to 4.0)](https://forums.bitovi.com/t/how-to-get-your-packages-right-for-example-upgrading-from-3-0-to-4-0/1013)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [January 9, 2019, 8:36pm UTC](https://forums.bitovi.com/t/how-to-get-your-packages-right-for-example-upgrading-from-3-0-to-4-0/1013 "2019-01-09T20:36:20Z")

</div>

Asked here in slack: https://gitter.im/canjs/canjs?at=5c36397357c6883f9b8af85a, the question is Is there a way to simultaneously upgrade all npm libraries to a compatible version when moving to can4 from can3 ? Unfor…

---

## [How to create redirect url in canjs](https://forums.bitovi.com/t/how-to-create-redirect-url-in-canjs/1012)

<div class="topic-metadata">

**Author:** [@Piyush\_Sharma](https://forums.bitovi.com/u/Piyush_Sharma)\
**Replies:** 3\
**Last updated:** [January 9, 2019, 12:38am UTC](https://forums.bitovi.com/t/how-to-create-redirect-url-in-canjs/1012 "2019-01-09T00:38:31Z")

</div>

Previously we are using canv2 whereas we have recently updated our application to canv3 so i am looking a way to redirect a user to another page after he click a button. For example in canv2 in our click function we use…

---

## [Steal-stache is now included in canjs](https://forums.bitovi.com/t/steal-stache-is-now-included-in-canjs/1007)

<div class="topic-metadata">

**Author:** [@matthewp](https://forums.bitovi.com/u/matthewp)\
**Replies:** 0\
**Last updated:** [December 12, 2018, 9:53pm UTC](https://forums.bitovi.com/t/steal-stache-is-now-included-in-canjs/1007 "2018-12-12T21:53:52Z")

</div>

canjs 5.19.0 was just released and now comes with steal-stache. This post is meant to briefly explain what this means. If you’ve been using canjs 5 and steal-stache in the past, you might have ran into problems on occas…

---

## ["Storybook" integration for CanJS](https://forums.bitovi.com/t/storybook-integration-for-canjs/979)

<div class="topic-metadata">

**Author:** [@Lighttree](https://forums.bitovi.com/u/Lighttree)\
**Replies:** 5\
**Last updated:** [December 4, 2018, 4:34pm UTC](https://forums.bitovi.com/t/storybook-integration-for-canjs/979 "2018-12-04T16:34:07Z")

</div>

Hi @justinbmeyer , I had one idea of the tool that might improve development experience. This is about how to create components library and in general way to have components that you can share between projects in case …

---

## [CanJS dark theme available via userstyles.org](https://forums.bitovi.com/t/canjs-dark-theme-available-via-userstyles-org/1002)

<div class="topic-metadata">

**Author:** [@RyanWheale](https://forums.bitovi.com/u/RyanWheale)\
**Replies:** 0\
**Last updated:** [November 29, 2018, 7:30pm UTC](https://forums.bitovi.com/t/canjs-dark-theme-available-via-userstyles-org/1002 "2018-11-29T19:30:19Z")

</div>

I am a big fan of having everything dark on my computer, and I use the Stylus addon for Google Chrome to apply dark themes to the sites I visit most frequently. I just threw together a dark theme for the CanJS website, w…

---

## [\[Solved\] Question: "get" v.s. "default"](https://forums.bitovi.com/t/solved-question-get-v-s-default/991)

<div class="topic-metadata">

**Author:** [@leoj3n](https://forums.bitovi.com/u/leoj3n)\
**Replies:** 6\
**Last updated:** [November 19, 2018, 11:52pm UTC](https://forums.bitovi.com/t/solved-question-get-v-s-default/991 "2018-11-19T23:52:45Z")

</div>

Sometimes I see: const AppViewModel = DefineMap.extend('App', { get title() { return 'My Cool App'; }, }); And other times I see: const AppViewModel = DefineMap.extend('App', { title: { default: 'My Cool…

---

## [\[Solved\] Question: "import" v.s. "can-import"](https://forums.bitovi.com/t/solved-question-import-v-s-can-import/992)

<div class="topic-metadata">

**Author:** [@leoj3n](https://forums.bitovi.com/u/leoj3n)\
**Replies:** 4\
**Last updated:** [November 16, 2018, 1:51am UTC](https://forums.bitovi.com/t/solved-question-import-v-s-can-import/992 "2018-11-16T01:51:41Z")

</div>

Sometimes I see: // widget.js import './widget.less'; And other times I see: \<!-- widget.stache --\> \<can-import from="./widget.less" /\> What’s the difference and why do some people seem to prefer one over the other? …

---

## [Integrating another observable library with canjs symbols](https://forums.bitovi.com/t/integrating-another-observable-library-with-canjs-symbols/994)

<div class="topic-metadata">

**Author:** [@roemhildtg](https://forums.bitovi.com/u/roemhildtg)\
**Replies:** 7\
**Last updated:** [November 17, 2018, 5:30am UTC](https://forums.bitovi.com/t/integrating-another-observable-library-with-canjs-symbols/994 "2018-11-17T05:30:56Z")

</div>

xposted from gitter, I figured this would be a more appropriate place to discuss… Hi guys, I’ve got a side project I’ve dabbled with in the past and would like to try integrating more tightly with Canjs. Its using Openl…

---

## [How to save the last url of some "base" url](https://forums.bitovi.com/t/how-to-save-the-last-url-of-some-base-url/995)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [November 14, 2018, 3:18pm UTC](https://forums.bitovi.com/t/how-to-save-the-last-url-of-some-base-url/995 "2018-11-14T15:18:51Z")

</div>

In a recent application, they wanted to store the last url within a page (or area) the user visited. This codepen shows how to do it: If you: click on Last Dogs Page and then select dog 1, then click Home Page, The…

---

## [\[Solved\] Question: "{{scope.vm.prop}}" v.s. "{{this.prop}}" v.s. "{{prop}}"](https://forums.bitovi.com/t/solved-question-scope-vm-prop-v-s-this-prop-v-s-prop/993)

<div class="topic-metadata">

**Author:** [@leoj3n](https://forums.bitovi.com/u/leoj3n)\
**Replies:** 1\
**Last updated:** [November 13, 2018, 5:34pm UTC](https://forums.bitovi.com/t/solved-question-scope-vm-prop-v-s-this-prop-v-s-prop/993 "2018-11-13T17:34:17Z")

</div>

What is the difference between these three: {{scope.vm.prop}} {{this.prop}} {{prop}} Which is most explicit, and which do you think is most noob-friendly? Sometimes I’m afraid there might be some magic going on in Can…

---

## [Why is my Color Chooser's frame rate with Vue so much higher than with CanJS?](https://forums.bitovi.com/t/why-is-my-color-choosers-frame-rate-with-vue-so-much-higher-than-with-canjs/986)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 4\
**Last updated:** [November 10, 2018, 2:04am UTC](https://forums.bitovi.com/t/why-is-my-color-choosers-frame-rate-with-vue-so-much-higher-than-with-canjs/986 "2018-11-10T02:04:05Z")

</div>

If you compare frame rates of the following pages, you will understand my question: CanJS Color Chooser Vue Color Chooser Details: If you click either of the links above, a Color Chooser page should run in Demo Mode,…

---

## [Upgrade to 3.13.1](https://forums.bitovi.com/t/upgrade-to-3-13-1/972)

<div class="topic-metadata">

**Author:** [@nada](https://forums.bitovi.com/u/nada)\
**Replies:** 3\
**Last updated:** [October 18, 2018, 3:13pm UTC](https://forums.bitovi.com/t/upgrade-to-3-13-1/972 "2018-10-18T15:13:53Z")

</div>

Hi all, I managed to resolve my issue with can-route from 7th of August by upgrading all packages. The downside: Two event related things formerly working in the html-file don’t do anything anymore. on:enter Typi…

---

## [Color Chooser Illustrates ViewModel Hierarchy Questions](https://forums.bitovi.com/t/color-chooser-illustrates-viewmodel-hierarchy-questions/938)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 10\
**Last updated:** [October 1, 2018, 1:50pm UTC](https://forums.bitovi.com/t/color-chooser-illustrates-viewmodel-hierarchy-questions/938 "2018-10-01T13:50:53Z")

</div>

In Communication between "sibling" ViewModels - #6 by code-read, I said: Conceptually, I’m attempting to 1) build a series of similar HTML elements in a loop; and 2) listen and respond to changes and/or events occurrin…

[Next page](https://forums.bitovi.com/c/canjs/6.md?page=1)
