These are chat archives for canjs/canjs

15th
Aug 2018
Stef
@sronsiek
Aug 15 2018 09:46
Can I append an observable property to a map object on the fly?
Stef
@sronsiek
Aug 15 2018 10:23
map.set or map.assign seem to do the trick ;)
Julian
@pYr0x
Aug 15 2018 17:39
@phillipskevin are you writing the routing guide?
the API docs said on https://canjs.com/doc/can-route.html#Changingtheroute that you can change the route programmatically by route.data.type = "videos";
is it not better to use .update() because
i have an app the has two routes
route.register("{page}", {page: "login"});
route.register("dashboard/{dashboard}");
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
Aug 15 2018 18:05
@pYr0x yes, depending on your route setup, you definitely might want to use update
Julian
@pYr0x
Aug 15 2018 18:06
ok ;) maybe you can add this to the new routing guide :)
Kevin Phillips
@phillipskevin
Aug 15 2018 18:06
:thumbsup:
Justin Meyer
@justinbmeyer
Aug 15 2018 19:17
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
Aug 15 2018 19:48
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
Aug 15 2018 20:57
@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
Aug 15 2018 20:58
@justinbmeyer thanks!!!