# CanJS

**URL:** https://forums.bitovi.com/c/canjs/6.md?page=1

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

**Page:** 2

---

## [\[Solved\] Struggling with CanJS packages between major releases](https://forums.bitovi.com/t/solved-struggling-with-canjs-packages-between-major-releases/970)

<div class="topic-metadata">

**Author:** [@leoj3n](https://forums.bitovi.com/u/leoj3n)\
**Replies:** 8\
**Last updated:** [September 27, 2018, 4:27pm UTC](https://forums.bitovi.com/t/solved-struggling-with-canjs-packages-between-major-releases/970 "2018-09-27T16:27:42Z")

</div>

I’m using the can package, as opposed to individual deps themselves, which poses an issue when the deps of the can package become outdated. This very topic was discussed in the following contributors meeting: One prop…

---

## [Newbie - can.Model.extend](https://forums.bitovi.com/t/newbie-can-model-extend/964)

<div class="topic-metadata">

**Author:** [@Sonny\_Torres](https://forums.bitovi.com/u/Sonny_Torres)\
**Replies:** 2\
**Last updated:** [September 19, 2018, 8:55pm UTC](https://forums.bitovi.com/t/newbie-can-model-extend/964 "2018-09-19T20:55:19Z")

</div>

Filter= can.Control.extend({ init: function(){}, getCustomerSearch: function(data){ console.log(JSON.stringify(data)); }, getCompanyDetails: function(data){ console.log(JSON.stringify(data)); } },{}) var FilterSea…

---

## [VS Code Settings for can-stache tag auto-completion without a plugin](https://forums.bitovi.com/t/vs-code-settings-for-can-stache-tag-auto-completion-without-a-plugin/965)

<div class="topic-metadata">

**Author:** [@Mike\_Mitchel](https://forums.bitovi.com/u/Mike_Mitchel)\
**Replies:** 0\
**Last updated:** [September 18, 2018, 6:35pm UTC](https://forums.bitovi.com/t/vs-code-settings-for-can-stache-tag-auto-completion-without-a-plugin/965 "2018-09-18T18:35:39Z")

</div>

If you’re a VS Code user, this will help for tag auto-completion in can-stache files. In the latest version of VS Code, your settings.json file can be found by going to Preferences–\>Settings, then click the little … menu…

---

## [Not rendering content of \<content /\>?](https://forums.bitovi.com/t/not-rendering-content-of-content/960)

<div class="topic-metadata">

**Author:** [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Replies:** 2\
**Last updated:** [September 12, 2018, 10:05am UTC](https://forums.bitovi.com/t/not-rendering-content-of-content/960 "2018-09-12T10:05:19Z")

</div>

We have some issues with the usage of the element in can-components. Unfortunately I was not able to reproduce the issue in a fiddle yet, here is a simple, working example. It is more or less C/P from the documentation. …

---

## [User login and route change at the same time](https://forums.bitovi.com/t/user-login-and-route-change-at-the-same-time/954)

<div class="topic-metadata">

**Author:** [@pYr0x](https://forums.bitovi.com/u/pYr0x)\
**Replies:** 1\
**Last updated:** [August 24, 2018, 7:19pm UTC](https://forums.bitovi.com/t/user-login-and-route-change-at-the-same-time/954 "2018-08-24T19:19:52Z")

</div>

i have a webpage that has a login and an interal area. i use bitballs approach to login in a user https://github.com/donejs/bitballs/blob/master/public/components/navigation/navigation.js#L86 create a session save tha…

---

## [Scenarios for 'can-reflect.setValue - Can not set value'?](https://forums.bitovi.com/t/scenarios-for-can-reflect-setvalue-can-not-set-value/948)

<div class="topic-metadata">

**Author:** [@BairDev](https://forums.bitovi.com/u/BairDev)\
**Replies:** 9\
**Last updated:** [August 20, 2018, 3:05pm UTC](https://forums.bitovi.com/t/scenarios-for-can-reflect-setvalue-can-not-set-value/948 "2018-08-20T15:05:26Z")

</div>

We are currently migrating a huge and equally old collection of apps from v3 to v4 (they have a lot of v2 remnants, too). All models are already extensions of DefineMap. But now (CanJS 4.3.0) we see a lot of errors like …

---

## [Object with component listeners is unexpectedly deleted](https://forums.bitovi.com/t/object-with-component-listeners-is-unexpectedly-deleted/947)

<div class="topic-metadata">

**Author:** [@DmitryOsi](https://forums.bitovi.com/u/DmitryOsi)\
**Replies:** 10\
**Last updated:** [August 14, 2018, 2:45pm UTC](https://forums.bitovi.com/t/object-with-component-listeners-is-unexpectedly-deleted/947 "2018-08-14T14:45:29Z")

</div>

Hello, I have an application that consists of several components (The application is inside webpack bundle, also there is another bundled app on the page), one them is app-links. This component has several event listene…

---

## [Upgrade Path From 2.0.4](https://forums.bitovi.com/t/upgrade-path-from-2-0-4/943)

<div class="topic-metadata">

**Author:** [@thecountofzero](https://forums.bitovi.com/u/thecountofzero)\
**Replies:** 1\
**Last updated:** [August 9, 2018, 2:58pm UTC](https://forums.bitovi.com/t/upgrade-path-from-2-0-4/943 "2018-08-09T14:58:23Z")

</div>

I have a very old, large scale application that was written using CanJS v2.0.4 and was wondering what the upgrade path might look to bring it into 2018. This thing was started many years ago before can.Component was eve…

---

## [Issue after updating can-route](https://forums.bitovi.com/t/issue-after-updating-can-route/944)

<div class="topic-metadata">

**Author:** [@nada](https://forums.bitovi.com/u/nada)\
**Replies:** 1\
**Last updated:** [August 7, 2018, 9:38pm UTC](https://forums.bitovi.com/t/issue-after-updating-can-route/944 "2018-08-07T21:38:40Z")

</div>

I am still running on some 3.\* version and tried to update can-route from 3.0.11 to 3.3.4. I ran npm update can-route in my XYZ/node\_modules directory After doing so the console gives me: steal.js:3198 GET http://XYZ/…

---

## [Loading symbol until component is inserted](https://forums.bitovi.com/t/loading-symbol-until-component-is-inserted/935)

<div class="topic-metadata">

**Author:** [@pYr0x](https://forums.bitovi.com/u/pYr0x)\
**Replies:** 0\
**Last updated:** [July 25, 2018, 8:07am UTC](https://forums.bitovi.com/t/loading-symbol-until-component-is-inserted/935 "2018-07-25T08:07:13Z")

</div>

with the new canjs4, can components are now automouted. they get inserted if a html tag is available, even on the DOM. but is there a possibility to show a loading GIF until the component is inserted complete? i cam up…

---

## [Promises as values](https://forums.bitovi.com/t/promises-as-values/933)

<div class="topic-metadata">

**Author:** [@eben\_roux](https://forums.bitovi.com/u/eben_roux)\
**Replies:** 1\
**Last updated:** [July 20, 2018, 2:24pm UTC](https://forums.bitovi.com/t/promises-as-values/933 "2018-07-20T14:24:41Z")

</div>

I created an example demonstrating what I am trying to do. I have a DefineList of items that are returned as a Promise but they never seem to render. I also have a rawItems list that is updated at the same time (to sho…

---

## [Communication between "sibling" ViewModels](https://forums.bitovi.com/t/communication-between-sibling-viewmodels/927)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 5\
**Last updated:** [July 19, 2018, 2:57pm UTC](https://forums.bitovi.com/t/communication-between-sibling-viewmodels/927 "2018-07-19T14:57:03Z")

</div>

I’m attempting to use CanJS to build a web page where changes to one section produce changes to another section. I want to treat each section as a separate ViewModel so that I can use plain JavaScript to configure eleme…

---

## [CanJS 5.0 is out!](https://forums.bitovi.com/t/canjs-5-0-is-out/931)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [July 18, 2018, 5:47pm UTC](https://forums.bitovi.com/t/canjs-5-0-is-out/931 "2018-07-18T17:47:32Z")

</div>

CanJS 5.0 is out! Read about it here: https://www.bitovi.com/blog/canjs-5 If you’re happy with it and all our hard work, please share: Twitter: https://twitter.com/canjs/status/1019625796175097856 Facebook: https://w…

---

## [How to limit event outcome to element of origin](https://forums.bitovi.com/t/how-to-limit-event-outcome-to-element-of-origin/919)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 9\
**Last updated:** [June 28, 2018, 5:51pm UTC](https://forums.bitovi.com/t/how-to-limit-event-outcome-to-element-of-origin/919 "2018-06-28T17:51:54Z")

</div>

I’m attempting to use CanJS to: Create multiple instances of the same custom element (e.g., \<canEl\>) Act on a single instance of this custom element when that element is the origin of an event (for example a hover …

---

## [I don't know why, but I like this ... (convert strings to other primitives)](https://forums.bitovi.com/t/i-dont-know-why-but-i-like-this-convert-strings-to-other-primitives/922)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [June 27, 2018, 7:50pm UTC](https://forums.bitovi.com/t/i-dont-know-why-but-i-like-this-convert-strings-to-other-primitives/922 "2018-06-27T19:50:21Z")

</div>

The following takes what you type and tells you if you’ve typed number (This is in 5.0, but works with minor adjustments in 3.0 and 4.0). import { Component, stache, stacheConverters } from "//unpkg.com/can@5/ecosy…

---

## [Upgrading to 5.0? Here's a commented commit to learn from!](https://forums.bitovi.com/t/upgrading-to-5-0-heres-a-commented-commit-to-learn-from/917)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [June 20, 2018, 7:57pm UTC](https://forums.bitovi.com/t/upgrading-to-5-0-heres-a-commented-commit-to-learn-from/917 "2018-06-20T19:57:45Z")

</div>

I recently upgraded Bitovi’s internal (but OS) Bitcentive app from CanJS 4.0 to CanJS 5.0. I added comments about the changes I made. Hopefully people find this useful: This is similar to the 3-\>4 upgrade post: Upgrad…

---

## [Upgrading to 4.0? Here's a commented commit to learn from!](https://forums.bitovi.com/t/upgrading-to-4-0-heres-a-commented-commit-to-learn-from/915)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 0\
**Last updated:** [June 18, 2018, 9:59pm UTC](https://forums.bitovi.com/t/upgrading-to-4-0-heres-a-commented-commit-to-learn-from/915 "2018-06-18T21:59:24Z")

</div>

I recently upgraded Bitovi’s internal (but OS) Bitcentive app from CanJS 3.0 to CanJS 4.0. I added comments about the changes I made. Hopefully people find this useful:

---

## [Canjs4: crashes calling helpers withing partialName stache](https://forums.bitovi.com/t/canjs4-crashes-calling-helpers-withing-partialname-stache/913)

<div class="topic-metadata">

**Author:** [@sronsiek](https://forums.bitovi.com/u/sronsiek)\
**Replies:** 2\
**Last updated:** [June 14, 2018, 11:54am UTC](https://forums.bitovi.com/t/canjs4-crashes-calling-helpers-withing-partialname-stache/913 "2018-06-14T11:54:13Z")

</div>

I’d like to describe what seems like a bug to me, maybe someone can explain, maybe a bug report should follow. We’re using canjs4 + stealjs on linux. {{\<componentPartial}} {{#is(scope.root.currentPage(), ‘some\_page\_n…

---

## ["Unable to find key" warnings in CanJS 4.0](https://forums.bitovi.com/t/unable-to-find-key-warnings-in-canjs-4-0/906)

<div class="topic-metadata">

**Author:** [@phillipskevin](https://forums.bitovi.com/u/phillipskevin)\
**Replies:** 0\
**Last updated:** [June 5, 2018, 2:58pm UTC](https://forums.bitovi.com/t/unable-to-find-key-warnings-in-canjs-4-0/906 "2018-06-05T14:58:09Z")

</div>

In recent versions of CanJS, we have updated the warnings that are given if can-stache can’t find a key you are trying to use. If you have recently upgraded CanJS, you’ve probably seen warnings like these: This post …

---

## [Space out your stache](https://forums.bitovi.com/t/space-out-your-stache/901)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 2\
**Last updated:** [June 11, 2018, 6:47pm UTC](https://forums.bitovi.com/t/space-out-your-stache/901 "2018-06-11T18:47:10Z")

</div>

These find/replace scripts: \\{\\{(\[^ #\\/\\^!\]) -\> {{ $1 \\{\\{(\[#\\/\\^!\])(\[^ \]) -\> {{$1 $2 (\[^ \])\\}\\} -\> $1 }} space out your stache to look more like: {{# if(app.session) }} {{# if(app.session.isAdmin) }} \<li {{# is(…

---

## [Benchmarks ftw!](https://forums.bitovi.com/t/benchmarks-ftw/904)

<div class="topic-metadata">

**Author:** [@janat08](https://forums.bitovi.com/u/janat08)\
**Replies:** 2\
**Last updated:** [June 11, 2018, 6:08pm UTC](https://forums.bitovi.com/t/benchmarks-ftw/904 "2018-06-11T18:08:55Z")

</div>

Any1 haz dem unreal benchmarks.

---

## [Weston: A new templating engine for CanJS apps](https://forums.bitovi.com/t/weston-a-new-templating-engine-for-canjs-apps/468)

<div class="topic-metadata">

**Author:** [@matthewp](https://forums.bitovi.com/u/matthewp)\
**Replies:** 5\
**Last updated:** [June 8, 2018, 4:57pm UTC](https://forums.bitovi.com/t/weston-a-new-templating-engine-for-canjs-apps/468 "2018-06-08T16:57:37Z")

</div>

Hello everyone. A few months back I got the urge to try and do templating using the \<template\> element and fix some of the problems I find with Stache. Since CanJS 3.0 has opened up several APIs that stache uses, this t…

---

## [Fastest stream library year ago](https://forums.bitovi.com/t/fastest-stream-library-year-ago/905)

<div class="topic-metadata">

**Author:** [@janat08](https://forums.bitovi.com/u/janat08)\
**Replies:** 0\
**Last updated:** [June 3, 2018, 7:17pm UTC](https://forums.bitovi.com/t/fastest-stream-library-year-ago/905 "2018-06-03T19:17:35Z")

</div>

Posting with regards to can-stream wrapper and kefir implementation.

---

## [Third party view library](https://forums.bitovi.com/t/third-party-view-library/897)

<div class="topic-metadata">

**Author:** [@janat08](https://forums.bitovi.com/u/janat08)\
**Replies:** 2\
**Last updated:** [June 2, 2018, 10:38am UTC](https://forums.bitovi.com/t/third-party-view-library/897 "2018-06-02T10:38:45Z")

</div>

What methods/api becomes pointless once I use my own view layer library? I appreciate the modularity, although it doesn’t appear to compare to nx-framework that claims to follow express design.

---

## [Map event listening](https://forums.bitovi.com/t/map-event-listening/890)

<div class="topic-metadata">

**Author:** [@fp\_dev](https://forums.bitovi.com/u/fp_dev)\
**Replies:** 3\
**Last updated:** [May 28, 2018, 12:41pm UTC](https://forums.bitovi.com/t/map-event-listening/890 "2018-05-28T12:41:59Z")

</div>

Hi everybody, Is it possible, with CanV4 to listen to changes for all keys in a Map or a List that includes nested Maps? For instance: const Coordinates = can.Map.extend({ latitude: "number", longitude:"number"}); co…

---

## [More CanJS documentation remarks](https://forums.bitovi.com/t/more-canjs-documentation-remarks/893)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 1\
**Last updated:** [May 25, 2018, 6:24pm UTC](https://forums.bitovi.com/t/more-canjs-documentation-remarks/893 "2018-05-25T18:24:18Z")

</div>

My previous remarks about DoneJS documentation were so well received I’m encouraged to share a bit more :grinning:. Note that all of the following is based on the 5.0.0.pre.0 docs: Today I was attempting to understand …

---

## [Binding the insert/show event for DOM element](https://forums.bitovi.com/t/binding-the-insert-show-event-for-dom-element/891)

<div class="topic-metadata">

**Author:** [@fp\_dev](https://forums.bitovi.com/u/fp_dev)\
**Replies:** 3\
**Last updated:** [May 25, 2018, 5:14pm UTC](https://forums.bitovi.com/t/binding-the-insert-show-event-for-dom-element/891 "2018-05-25T17:14:04Z")

</div>

Hi, In the previous version (CanV2), this was possible to use the ($inserted) = "inserted(%element)" syntax to catch the event when a new DOM element is inserted/showed in the DOM and it was very useful for situation w…

---

## [How to "delay" route changes](https://forums.bitovi.com/t/how-to-delay-route-changes/888)

<div class="topic-metadata">

**Author:** [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Replies:** 6\
**Last updated:** [May 25, 2018, 6:59am UTC](https://forums.bitovi.com/t/how-to-delay-route-changes/888 "2018-05-25T06:59:49Z")

</div>

Arising from this discussion: My suggestion was to create a “shield” observable value that gets used instead of route.data. This can be done something like: AppVM = DefineMap.extend({ // the actual stateful values…

---

## [CanJS documentation questions](https://forums.bitovi.com/t/canjs-documentation-questions/889)

<div class="topic-metadata">

**Author:** [@code-read](https://forums.bitovi.com/u/code-read)\
**Replies:** 4\
**Last updated:** [May 23, 2018, 5:58pm UTC](https://forums.bitovi.com/t/canjs-documentation-questions/889 "2018-05-23T17:58:02Z")

</div>

QUESTION 1: \[tl;dr: is v2.canjs.com “legacy” documentation? If so, is there a reliable way to identify what is/isn’t legacy?\] The doc at CanJS - can.Component.extend says, You will typically provide the following val…

---

## [Capturing appViewModel events in CanJS 4](https://forums.bitovi.com/t/capturing-appviewmodel-events-in-canjs-4/882)

<div class="topic-metadata">

**Author:** [@robfoweraker](https://forums.bitovi.com/u/robfoweraker)\
**Replies:** 12\
**Last updated:** [May 9, 2018, 3:28pm UTC](https://forums.bitovi.com/t/capturing-appviewmodel-events-in-canjs-4/882 "2018-05-09T15:28:07Z")

</div>

HI All, Another question related to a CanJS 3 to CanJS 4 migration. I have a simple appViewModel defined and linked to the router import DefineMap from 'can-define/map/'; var AppViewModel = DefineMap.extend('AppViewMo…

[Previous page](https://forums.bitovi.com/c/canjs/6.md)

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