Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:03
    greenkeeper[bot] labeled #5422
  • 18:03
    greenkeeper[bot] opened #5422
  • 18:03

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • 18:02
    greenkeeper[bot] commented #5401
  • 18:02

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 10 23:39

    greenkeeper[bot] on @octokit

    (compare)

  • Nov 10 23:37

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Nov 08 16:08
    greenkeeper[bot] labeled #5421
  • Nov 08 16:08
    greenkeeper[bot] opened #5421
  • Nov 08 16:08

    greenkeeper[bot] on can-stache-bindings-5.0.2

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

  • Nov 07 17:31

    cherifGsoul on 6-2-5-version

    (compare)

  • Nov 07 17:31
    cherifGsoul closed #5420
  • Nov 07 17:30

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 07 17:28
    cherifGsoul edited as member
  • Nov 07 17:27
    cherifGsoul added as member
  • Nov 07 17:17
    cherifGsoul opened #5420
  • Nov 07 17:17

    cherifGsoul on 6-2-5-version

    Bump Version I don't have push… (compare)

  • Nov 07 17:09

    cherifGsoul on v6.2.5

    Update dist for release 6.2.5 (compare)

  • Nov 07 16:49

    greenkeeper[bot] on can-observable-mixin-1.0.5

    (compare)

  • Nov 07 16:49

    phillipskevin on can-observable-mixin-1.0.6

    (compare)

Frank Lemanschik
@frank-dspeed
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;
    }
}
should be the same as steal 0.16
Marc Godard
@MarcGodard
@phillipskevin thanks, will play with that.
Marc Godard
@MarcGodard
@phillipskevin It doesn't seem to work for subpages...
        page: {
            set(newVal) {
                if (newVal == 'listing') {
                    ga('set', { page: newVal + '/' + this.attr("item") , title: this.attr('title') });
                    ga('send', 'pageview');
                } else {
                    ga('set', { page: newVal, title: this.attr('title') });
                    ga('send', 'pageview');
                }
                return newVal;
            }
        },
Kevin Phillips
@phillipskevin
there will be different events for the other properties
Marc Godard
@MarcGodard
I got it to work by using can.route.attr('item')
However, now this set property make my url domain.com/home/ instead of just domain.com/
Marc Godard
@MarcGodard
@phillipskevin I really only need to track subpages... so it seems to work fine when I do the
item: { set(val) {} }
Kevin Phillips
@phillipskevin
yeah, that should work
if that’s all you need
I don’t think that setter should cause your route to change
Marc Godard
@MarcGodard
Yeah. Kinda disappointed in the route stuff. I hope when I move to donejs 1 it is better
It was because I set a default as 'home' so because of the set value for some reason, it would add it to the URL
Kevin Phillips
@phillipskevin
if you have suggestions on how we could improve it, please feel free to open issues
yeah, that sounds like a bug, but I’m not sure
Marc Godard
@MarcGodard
I will once I get into donejs v1.
It wouldn't be fair to report issues on old versions.
My new site is looking real good though. I can't wait to figure out the SSR and all that so I don't run from a build.
Frank Lemanschik
@frank-dspeed
Ehm you should in Production always run from a build
even if your using ssr
Juan Orozco
@Macrofig
DocumentJS question: how do you escape the @? I have @package in a code block so it isn't meant to be a documented. DocumentJS/bit-docs is seeing that and throwing an error.
Chasen Le Hara
@chasenlehara
@Macrofig, just FYI, there’s https://gitter.im/bitovi/documentjs
I don’t know the answer to your question though (if \@ didn’t work)… maybe @justinbmeyer @phillipskevin or @matthewp know?
Juan Orozco
@Macrofig
Ah, for some reason, I thought we consolidated to this and donejs channel.
So, \@ works but there's an issue. I'll take the conversation to docjs channel.
lmagarian
@lmagarian
I'm trying to make a group of checkboxes bound to a DefineList of strings. Using this code:
<input type="checkbox" id="{{item}}" {($checked)}="boolean-to-inList(item, selectedKeys)" />
It is correctly setting the checked state when the page loads
I'd expected selectedKeys to be updated as the checkbox is checked or unchecked but it isn't. What do I need to do differently?
Kevin Phillips
@phillipskevin
can you create a JSBin example?
can’t see anything wrong with just that line
Kevin Phillips
@phillipskevin
lmagarian
@lmagarian
ok, I modified that to use DefineList for the owns array and it still works
Kevin Phillips
@phillipskevin
maybe you don’t have can-stache-converters imported in your app?
Justin Meyer
@justinbmeyer
A walk through of how to build a file navigator ... you can probably skip the first 20 min or so if you are familiar with CanJS
@MarcGodard I wouldn't suggest using can.Control + routes like that