Skip to content

Traduction de history-mode.md #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 16, 2017
Merged

Traduction de history-mode.md #21

merged 6 commits into from
Jul 16, 2017

Conversation

MachinisteWeb
Copy link
Member

Dernière page de la partie essential. J'ai rajouté du contenu que je vais proposer en PR à l'original.

Signed-off-by: Bruno Lesieur <[email protected]>
# Conflicts:
#	docs/en/essentials/history-mode.md
Signed-off-by: Bruno Lesieur <[email protected]>
@MachinisteWeb MachinisteWeb self-assigned this Jul 13, 2017
@MachinisteWeb MachinisteWeb requested a review from Kocal July 13, 2017 12:10
@MachinisteWeb MachinisteWeb changed the title History mode Traduction de history-mode.md Jul 13, 2017
Signed-off-by: Bruno Lesieur <[email protected]>

To get rid of the hash, we can use the router's **history mode**, which leverages the `history.pushState` API to achieve URL navigation without a page reload:
Pour se passer du hash, nous pouvons prendre en main le **mode historique** qui va utiliser l'API `history.pushState` pour réaliser de la navigation d'URL sans recharger la page :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nous pouvons utiliser le mode historique qui utilisera l'API history.pushState afin de permettre une navigation sans rechargement de page :


Here comes a problem, though: Since our app is a single page client side app, without a proper server configuration, the users will get a 404 error if they access `http://oursite.com/user/id` directly in their browser. Now that's ugly.
Cependant, un problème apparaît si votre application est une application monopage cliente. Sans une configuration serveur adaptée, les utilisateurs tomberons sur une page d'erreur 404 en tentant d'accéder à `http://oursite.com/user/id` directement dans leur navigateur. Maintenant ça craint.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est de la merde !
https://www.youtube.com/watch?v=thx7fyY0kWU

(Non en vrai ne change rien)

http.createServer(function (req, res) {
fs.readFile("index.htm", "utf-8", function (err, content) {
if (err) {
console.log('Impossible d'ouvrir le fichie "index.htm".')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impossible d\'ouvrir le fichier "index.htm"

Signed-off-by: Bruno Lesieur <[email protected]>
@MachinisteWeb
Copy link
Member Author

Merci @Kocal ! Je merge dès que tu valides.

@Kocal
Copy link
Member

Kocal commented Jul 15, 2017

Ok pour moi. ^^

@MachinisteWeb MachinisteWeb merged commit 2905b28 into working Jul 16, 2017
@MachinisteWeb MachinisteWeb deleted the history-mode branch July 16, 2017 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants