You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Global properties support should be improved through an augmented Status or route-based service. Some of these are essential to any web app and make front-end development work much easier, for example:
Body tag identifiers (page or route-based classes and IDs)
Meta tags (for SEO purposes, also page or route-based)
@joshnuss That would involve overriding routes.coffee in the host app, correct? How would we later reference these custom options on the app's views (eg.: injecting the keywords property to a meta tag)?
I would love for us to set those in the routes and override them in the controllers if needed. This way you don't need to create a controller just to set the meta of a page...
Activity
rodrigodalcindev commentedon Jun 15, 2015
As a reminder, @simonwalsh suggests using Bower to achieve this.
joshnuss commentedon Jun 15, 2015
We can add custom options for these to our routes (like how we added
requires: {user: true})Example:
rodrigodalcindev commentedon Jun 16, 2015
@joshnuss That would involve overriding
routes.coffeein the host app, correct? How would we later reference these custom options on the app's views (eg.: injecting thekeywordsproperty to ametatag)?simonwalsh commentedon Jun 16, 2015
@rodrigodalcindev
You can get them from the
$routeobject when you transition from start to success.I would still advise for us to build a proper
Statusmodule that would take care of this sort of things.I started a proof of concept in reformation and it looks like so:
... and in the
Statusservice:I would love for us to set those in the
routesand override them in the controllers if needed. This way you don't need to create a controller just to set the meta of a page...simonwalsh commentedon Jun 16, 2015
I have many ideas for this module so I can assign that to me!
joshnuss commentedon Jun 16, 2015
@rodrigodalcindev @simonwalsh Good points
What do you think about defining "status" settings in a different file? Like have a
status.coffee(we should find a better name then "status")e.g.
That way sites dont have to override routes or controllers to adjust meta stuffs
simonwalsh commentedon Jun 16, 2015
@joshnuss Exactly what I had in mind!
The way I see it is :
0 being the lowest priority. This way we would have a convenient and flexible meta service.
joshnuss commentedon Jun 16, 2015
@simonwalsh big 👍