Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 13 15:14
    greenkeeper[bot] commented #5375
  • Oct 13 15:14

    greenkeeper[bot] on core-js-3.3.1

    chore(package): update core-js … (compare)

  • Oct 13 14:49
    greenkeeper[bot] labeled #5375
  • Oct 13 14:49
    greenkeeper[bot] opened #5375
  • Oct 13 14:49

    greenkeeper[bot] on core-js-3.3.0

    chore(package): update core-js … (compare)

  • Oct 12 18:35
    matthewp commented #5358
  • Oct 12 18:15
    chasenlehara commented #5358
  • Oct 12 06:41

    greenkeeper[bot] on @octokit

    (compare)

  • Oct 12 06:39

    greenkeeper[bot] on @octokit

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

  • Oct 11 19:01
    m-mujica edited #5374
  • Oct 11 19:01
    m-mujica opened #5374
  • Oct 11 19:00

    m-mujica on update-deep-observable

    Update can-deep-observable to l… (compare)

  • Oct 11 18:55
    m-mujica edited #5365
  • Oct 11 18:54
    greenkeeper[bot] labeled #5373
  • Oct 11 18:54
    greenkeeper[bot] opened #5373
  • Oct 11 18:54

    greenkeeper[bot] on can-deep-observable-1.0.1

    fix(package): update can-deep-o… (compare)

  • Oct 11 16:42
    LakshanKarunathilake starred canjs/canjs
  • Oct 11 14:58
    greenkeeper[bot] labeled #5372
  • Oct 11 14:58
    greenkeeper[bot] opened #5372
  • Oct 11 14:58

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

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

Julian
@pYr0x
by changing the route to route.data.dashboard= "logistic"; and then back to route.data.page = "login";, dashboard in route.data has still logistic
and the route looks like !#dashboard/logistic&page=login
Kevin Phillips
@phillipskevin
@pYr0x yes, depending on your route setup, you definitely might want to use update
Julian
@pYr0x
ok ;) maybe you can add this to the new routing guide :)
Kevin Phillips
@phillipskevin
:thumbsup:
Justin Meyer
@justinbmeyer
Someone asked me the advantageous of DefineMap over can.Map
Here they are in order of importance (imo):
  1. More self-documenting & easier to figure out where you went wrong => Throws (in strict mode) if you forget to create a property or spell something wrong
  2. No more using .attr() everywhere.
  3. Faster (both when reading / writing and has lazy default values)
  4. Correctness => value() for "streaming" property definitions
  5. Lot of nice short hands (get prop(){}, addresses: [Address]})
  6. Works better with the stack. If you have a get fullName(){}, you see something like FooVM's fullName getter in the stack
gregorgodoy
@gregorgodoy
Hi guys!! A have a very general question. Components implement custom html tags. Does this tags impact negative in SEO? How are they handled by google bot, are they just ignored and evaluated by the content? Thanks
Justin Meyer
@justinbmeyer
@gregorgodoy yeah, they are ignored by google bot
treated like <div>
@/all tomorrow I'm going to be showing how to use new Component({ ... }) to make a multi-modal: https://www.youtube.com/watch?v=k-6PKxfc2wE
gregorgodoy
@gregorgodoy
@justinbmeyer thanks!!!
Viktor Busko
@Lighttree

@Lighttree what are you trying to do?

@justinbmeyer There is helper that returns value that I need to bind.

I was able to do do this, there was just some extra ' symbol in my code.
Thomas Sieverding
@Bajix
Hmm I thought it used to be the case that you could set properties on components that correlate w/ viewModel propertys that have htmlbool in order to set true. Like <my-component bar/>. This doesn’t work anymore?? Is there anything shorter than <my-component bar:from=“‘true’”/>?
Ivo Pinheiro
@ivospinheiro

@Bajix
You could use:
<my-component bar:raw="true"/>
Please check:
https://canjs.com/doc/can-stache-bindings.raw.html

Is that what you're looking for?

Justin Meyer
@justinbmeyer
@Bajix yeah, we removed that in 4.0 because it caused a lot of confusion for people when they would do something like aria-X="value" and suddenly that was a property on a component
raw is the substitute
(thanks @ivospinheiro for the tip!)
Ivo Pinheiro
@ivospinheiro
You're welcome ;-)
I had a similar question a few days ago and @roemhildtg has helped me.
Justin Meyer
@justinbmeyer
nice, thanks @roemhildtg for being the grandfather of this assist
Matthew Phillips
@matthewp
Thomas Sieverding
@Bajix
@ivospinheiro @justinbmeyer Thanks! That change makes sense. It looks like I can do type:htmlbool and make this work w/ just bar:raw so that’s still reasonably short
Gregg Roemhildt
@roemhildtg
grandfather, now I feel old ;)
qantourisc
@qantourisc
What is the best way to call a function on the viewModel of components inantiated from can.Component.view template ?
ATM I am thinking select-by-html
Julian
@pYr0x
why is my select broken if i use value
i want to use listenTo on a more complex szenario
something like this
  select: {
    type: "string",
    value: function (prop) {
      prop.listenTo("data", () => {
        resolve(this.data.get(0).value);
      });
    }
  },
  data: {
    get: function (lastSet, resolve) {
      this.dataPromise.then(resolve);
    }
  },
  dataPromise: {
    get: function () {
      return Select.getList(Object.assign({}, this.apiEndpoints)).then((response) => {
        // this.select = response[0].value;
        // this.select = "all";
        return response;
      });
    }
  }
but if you see in the codepen, the select is broken if i use value
if you comment out value the select will work again
qantourisc
@qantourisc
You didn't define what was broken.
A select sorry
@pYr0x you are trying to set value by the select element. However, value does not allow setting. You might wish to be using set get instead ?
Julian
@pYr0x
@qantourisc resovle will set the value, i thought
qantourisc @qantourisc reads up
qantourisc
@qantourisc
hmmm works here, if I change the line prop.resolve("all"); to prop.resolve(prop);
i'm litle confused here
Julian
@pYr0x
?
qantourisc
@qantourisc
@pYr0x ok got it now. What do you expect to happen when you change the select v?
Julian
@pYr0x
the select will change
and the output in the view will be the new select value
with value you cant change the select
qantourisc
@qantourisc
so when you change the select in html
then the value:bind="value" will try to to viewModel.value = new value
or some equivalent