Flask route for AngularJS with HTML5 URL mode -


i have angularjs app being served via flask. using html5 routing mode , need redirect several urls client app. i'm not sure how wildcard matching needing correctly. match multiple levels of path this:

@app.route('/ui/') def ui():     return app.send_static_file('index.html') @app.route('/ui/<path>') def ui(path):     return app.send_static_file('index.html') @app.route('/ui/<path>/<path2>') def ui(path,path2):     return app.send_static_file('index.html') 

obviously don't , have 1 route (everything starting ui/).

the path url converter can you:

@app.route('/ui/<path:p>') def ui(p):     return app.send_static_file('index.html') 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -