s-cork / hashrouting Goto Github PK
View Code? Open in Web Editor NEWHashRouting - a dependancy for anvil.works that allows navigation in apps
License: Apache License 2.0
HashRouting - a dependancy for anvil.works that allows navigation in apps
License: Apache License 2.0
I would like a way of mimicking dynamic deep links using routing.
Example:
@routing.route('users/{user}', title="{user}'s profile")
user
should be available to the routed form, perhaps in a self.dynamic_vars
dict or similarI can have a go at implementing this myself, but I cannot guarantee code quality
Currently a warning is fired when leaving the app.
This should be the default behaviour when leaving a form with a before_unload
method
It should not be the default behaviour when leaving the app unless explicitly set.
on_navigation triggerd
should be on_navigation triggered
In normal Anvil forms it's self.call_js
but it appears that no such property exists on routing.Route
s. Could someone tell me? (Is there a better place to ask about this?)
The forum post on HashRouting outlines the thought process and development history of the dependency. It also (presumably) contains the instruction to use the dependency.
I am relatively new to Anvil and would love to use the HashRouting dependency, but I am unsure how to go about it.
Thank you for this dependency!
unintentionally invoking redirect can cause an infinite loop and should result in some sort of warning or error...
Currently, we can set page title by setting the title
parameter of the @routing.route
, but we can supply only items in url_keys
for dynamic title construction. If the form is displaying an article, we would want to display its title instead of its id
.
@routing.route('article', url_keys=['id'], title="Article-{id} | RoutingExample")
class ArticleForm(ArticleFormTemplate):
Is it possible to set the title of the page directly? We can then load the article
object from DB and set the title manually in __init__
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.