-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
@@ -5,65 +5,115 @@ block includes | |||
Every application starts out with what seems like a simple task: get data, transform them, and show them to users. | |||
Getting data could be as simple as creating a local variable or as complex as streaming data over a Websocket. | |||
|
|||
Chaque application commence avec ce qui semble être une tâche simple: obtenir des données, les transformer et leux montrer aux utilisateurs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
espace avant les :
en FR. Idéalement un
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leux -> les
Once data arrive, we could push their raw `toString` values directly to the view. | ||
That rarely makes for a good user experience. | ||
E.g., almost everyone prefers a simple birthday date like | ||
<samp>April 15, 1988</samp> to the original raw string format | ||
— <samp>Fri Apr 15 1988 00:00:00 GMT-0700 (Pacific Daylight Time)</samp>. | ||
|
||
Une fois que les données arrivent, nous pourrions pousser leur première value `toString` à la vue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leurs premières valeurs
Clearly some values benefit from a bit of massage. We soon discover that we | ||
desire many of the same transformations repeatedly, both within and across many applications. | ||
We almost think of them as styles. | ||
In fact, we'd like to apply them in our HTML templates as we do styles. | ||
|
||
Il est clair que certaines valeurs bénéficient d'un peu de massage. Nous découvrons bientôt que nous | ||
désirerons à plusieurs reprises les mêmes transformations, tant à l'intérieur et à travers de nombreuses applications. | ||
Nous pensons que presque d'entre eux que des styles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plutôt "Nous pensons presque à eux comme à des styles" ?
Clearly some values benefit from a bit of massage. We soon discover that we | ||
desire many of the same transformations repeatedly, both within and across many applications. | ||
We almost think of them as styles. | ||
In fact, we'd like to apply them in our HTML templates as we do styles. | ||
|
||
Il est clair que certaines valeurs bénéficient d'un peu de massage. Nous découvrons bientôt que nous | ||
désirerons à plusieurs reprises les mêmes transformations, tant à l'intérieur et à travers de nombreuses applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas clair. "A différents endroits de l'application" peut-être?
Il est clair que certaines valeurs bénéficient d'un peu de massage. Nous découvrons bientôt que nous | ||
désirerons à plusieurs reprises les mêmes transformations, tant à l'intérieur et à travers de nombreuses applications. | ||
Nous pensons que presque d'entre eux que des styles. | ||
En fait, nous aimerions les appliquer dans nos modèles HTML comme nous le faisons des styles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
le faisons avec les styles.
It's not much fun updating the template to test our custom pipe. | ||
We could upgrade the example to a "Power Boost Calculator" that combines | ||
our pipe and two-way data binding with `ngModel`. | ||
|
||
Il n'y a pas beaucoup de plaisir de mettre à jour le modèle pour tester notre pipe personnalisé. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modèle -> template
Angular looks for changes to data-bound values through a *change detection* process that runs after every JavaScript event: | ||
every keystroke, mouse move, timer tick, and server response. This could be expensive. | ||
Angular strives to lower the cost whenever possible and appropriate. | ||
|
||
Angular regarde des modifications aux valeurs liés aux données par le biais d'un processus de détection de changement qui est exécuté après chaque événement JavaScript: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarde des modif aux valeurs -> surveille les valeurs liées aux
avant :
Angular picks a simpler, faster change detection algorithm when we use a pipe. Let's see how. | ||
|
||
Angular choisit simplement, un algorithme de détection de changement rapide lorsque nous utilisons un pipe. Voyons comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
choisit un algorithme de détection de changement rapide et simple
The component in our next example uses the default, aggressive change detection strategy to monitor and update | ||
its display of every hero in the `heroes` #{_array}. Here's the template: | ||
|
||
Le composant dans notre prochain exemple utilise la valeur par défaut, la stratégie de détection de changement agressive pour surveiller et mettre à jour | ||
son affichage de chaque héros dans le `heroes` #{_array}. Voici le modèle: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modèle -> template
+makeExample('pipes/ts/app/flying-heroes.component.html', 'template-1', 'app/flying-heroes.component.html (v1)')(format='.') | ||
|
||
:marked | ||
The companion component class provides heroes, adds new heroes into the #{_array}, and can reset the #{_array}. | ||
|
||
La classe de composant compagnon fournit des héros, ajoute de nouveaux héros dans le #{_array}, et peut réinitialiser le #{_array}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classe du composant
Thank you for submitting this PR...
Please check if the PR fulfills these requirements
Please provide the issue number?
issue #24
Did you finish translating the whole issue?
What kind of change does this PR introduce? (check one with "x")
Other information: