Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:14
    patosullivan starred canjs/canjs
  • 17:42
    bmomberger-bitovi synchronize #5451
  • 17:42

    bmomberger-bitovi on update-deps

    update can-view-live, can-dom-m… (compare)

  • Jan 16 00:11
    greenkeeper[bot] labeled #5458
  • Jan 16 00:11
    greenkeeper[bot] opened #5458
  • Jan 16 00:11

    greenkeeper[bot] on can-simple-dom-1.7.1

    fix(package): update can-simple… (compare)

  • Jan 14 01:51
    likun7981 starred canjs/canjs
  • Jan 13 14:06
    piraz starred canjs/canjs
  • Jan 11 00:56
    KonTrax starred canjs/canjs
  • Jan 10 02:37
    jlburke starred canjs/canjs
  • Jan 09 04:17
  • Jan 09 04:17
    bbbbbroot starred canjs/canjs
  • Jan 06 18:58
    greenkeeper[bot] commented #5442
  • Jan 06 18:58

    greenkeeper[bot] on can-view-live-5.0.3

    fix(package): update can-view-l… (compare)

  • Jan 06 18:29
    greenkeeper[bot] opened #5457
  • Jan 06 18:29

    greenkeeper[bot] on can-dom-mutate-2.0.8

    fix(package): update can-dom-mu… (compare)

  • Jan 06 05:48
    frank-dspeed edited #5456
  • Jan 06 05:41
    frank-dspeed edited #5456
  • Jan 06 05:34
    frank-dspeed edited #5456
  • Jan 06 05:31
    frank-dspeed opened #5456
Marc Godard
@MarcGodard
FYI I am still using can 2.3
Kevin Phillips
@phillipskevin
if your’e using done-autorender you can use stache for your title like <title>{{title}}</title>
and set that value based on your routes
Matthew Phillips
@matthewp
or if not using done-autorender bind to your viewModel and set document.title when the title prop changes.
Gregg Roemhildt
@roemhildtg
I was wondering about something recently. This might be a silly question but can I create a component programatically on a dom element? Instead of rendering the component's stache template, could I do something like this?
new MyComponent(document.body.getElementById('app'), { prop: 'value' })
Justin Meyer
@justinbmeyer
@roemhildtg yes, but you have to provide it tagData
abdulr101
@abdulr101
hello
abdulr101
@abdulr101
@justinbmeyer Hi its Abdul , I know you already answer to my text editor question for canjs but i have another subset of this question lol, which is that, what do you suggest as far as picking between atom or sublime text editor because if I wanted to do more (feature wise in the future)with canjs or angularjs, what should i use , sublime or atom? (yours and any one else suggestion is appreciated thanks in advance).
Gregg Roemhildt
@roemhildtg
@justinbmeyer is tagData essentially the properties for the viewModel?
Maybe not, I found this on it, so it looks like tagData is an object with subtemplate, scope and options
Frank Lemanschik
@frank-dspeed
@roemhildtg thats totally right
thats the Object you need to provide thats exactly what a component is
tag + tagData
you can reverse engineer that via console.log(aNormalComponent)
to see some examples
and it would be nice if you could prepare a gist with your results :) so i can use that also
Chasen Le Hara
@chasenlehara
Even better, please consider contributing to the can-component docs: https://github.com/canjs/can-component/tree/master/docs
Frank Lemanschik
@frank-dspeed
@chasenlehara that was my final plan but don't wanted to ask for so much :)
@chasenlehara canjs/canjs#3007 wanna look into that?
and maybe writen down your opinion about that?
write lol not writen
i need a way to write proper english my autocorrection don't works well on gitter
Chasen Le Hara
@chasenlehara
I don’t have any additional comments on it that the core team hasn’t already discussed in the last contributors meeting or in this issue: donejs/donejs#792
Frank Lemanschik
@frank-dspeed
?
Chasen Le Hara
@chasenlehara
Frank Lemanschik
@frank-dspeed
yes i know what got discussed i was there :)
there was spoken about generator-donejs
but now i have thrown in that there is a long years existing project that would better fit
and no one commented on that something other then generate a new issue for that and i did that now in CanJS
so out of my view nothing got discussed
For me the result of the last meeting was generator-donejs can be splitted but no one was sure how far and what is donejs what is canjs
and i think this solves all that generator-donejs gets splitted does all donejs related and generator-canjs gets splitted and does all canjs related
Chasen Le Hara
@chasenlehara
Thanks for creating that issue. I think it falls under the discussion we had about the DoneJS generator, which we essentially tabled to discuss for a future version of DoneJS.
I don’t think it’s a priority for the core team until we have more time to think through and discuss what we want to do.
Frank Lemanschik
@frank-dspeed
I don't wanted to finish it i only needed to bring that up so i know what to do with that
as it also is in use
51 downloads last month :)
Chasen Le Hara
@chasenlehara
I’m not sure what to tell you about “what to do with that.”
If you find value in that project and want to contribute to it, go for it!
I don’t think it’s something the core team has time to put effort into right now.
Frank Lemanschik
@frank-dspeed
ok thats a point :)
Gregg Roemhildt
@roemhildtg
@frank-dspeed I'll play around with it a bit and post an update :smile:
Marc Godard
@MarcGodard

I am trying to track routes, I want to call google analytics when a route is changed.

I created the following js file..

import can from 'can';
import 'can/map/define/';
import 'can/route/pushstate/';

export default can.Control({
    'route': function() {
        // Matches every routing change, but gets passed no data.
        console.log("Something changed!")
    },
    ':page route': function(data) {
        console.log("page change", data);
        // Matches routes like #!todos/5,
        // and will get passed {id: 5} as data.
    },
    ':page/:item': function(data) {
        console.log("page change", data);
        // Matches routes like #!recipes/5,
        // and will get passed {id: 5, type: 'recipes'} as data.
    }
});

Then I import it into my app viewModal like this:

import 'app/utils/routing';

This doesn't work. I tried putting it on the bottom of the app view model with new Router(window); like this page has https://v2.canjs.com/docs/can.Control.route.html However that also didn't work.

Could someone help me with what I am missing?

Gira Minus
@gKreator
How to shim an AMD module using stealjs 1?
Kevin Phillips
@phillipskevin
@MarcGodard if you’re using done-autorender, I don’t think you can use Control based routing
all of your route properties will be on your appViewModel already
so you can just use setters there
page: {
    set function(val) {
        console.log(‘page changed’, val);
        return val;
    }
}