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
Copy file name to clipboardExpand all lines: i18n/it-IT.md
+23-19Lines changed: 23 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1532,13 +1532,13 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
1532
1532
1533
1533
## Gestione delle eccezzioni
1534
1534
1535
-
### decorators
1535
+
### decoratori (decorator)
1536
1536
1537
-
- Use a [decorator](https://docs.angularjs.org/api/auto/service/$provide#decorator), at config time using the [`$provide`](https://docs.angularjs.org/api/auto/service/$provide) service, on the [`$exceptionHandler`](https://docs.angularjs.org/api/ng/service/$exceptionHandler) service to perform custom actions when exceptions occur.
1537
+
- Usa un [decorator](https://docs.angularjs.org/api/auto/service/$provide#decorator), al momento del config una un servizio [`$provide`](https://docs.angularjs.org/api/auto/service/$provide), sul servizio [`$exceptionHandler`](https://docs.angularjs.org/api/ng/service/$exceptionHandler) per eseguire azioni ad hoc quando l'eccezione occorre.
1538
1538
1539
-
*Perché?*: Provides a consistent way to handle uncaught AngularJS exceptions for development-time or run-time.
1539
+
*Perché?*: Fornisci un modo consistente per la gestione delle eccezioni che non trattate da AngularJS sia durante lo sviluppo che a runtime.
1540
1540
1541
-
Nota: Another option is to override the service instead of using a decorator. This is a fine option, but if you want to keep the default behavior and extend it a decorator is recommended.
1541
+
Nota: Un'altra opzione è di fare l'override del servizio invece che usare un decorator. Questa è una buona opzione ma se vuoi tenere il comportamento di default ed estenderlo un decorator è consigliato.
1542
1542
1543
1543
```javascript
1544
1544
/* raccomandato */
@@ -1562,23 +1562,23 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
1562
1562
cause: cause
1563
1563
};
1564
1564
/**
1565
-
* Could add the error to a service's collection,
1566
-
* add errors to $rootScope, log errors to remote web server,
1567
-
* or log locally. Or throw hard. It is entirely up to you.
1568
-
* throw exception;
1565
+
* Potresti aggiungere l'errore ad una collezione del servizio,
1566
+
* aggiungere l'errore a $rootScope, fare il log degli errori ad un server web remoto,
1567
+
* oppure farlo localmente. O lanciare l'eccezione solamente. Sta del tutto a te.
1568
+
* lancia l'eccezione;
1569
1569
*/
1570
1570
toastr.error(exception.msg, errorData);
1571
1571
};
1572
1572
}
1573
1573
```
1574
1574
1575
-
### Exception Catchers
1575
+
### Ricevitore di eccezioni
1576
1576
1577
-
- Create a factory that exposes an interface to catch and gracefully handle exceptions.
1577
+
- Crea una factory che espone un'interfaccia per ricevere ee elegantemente gestire le eccezioni.
1578
1578
1579
-
*Perché?*: Provides a consistent way to catch exceptions that may be thrown in your code (e.g. during XHR calls or promise failures).
1579
+
*Perché?*: Fornisce un modo consistente di rivecere le eccezioni che possono essere lanciate nel tuo codice (p.e. durante una chiamata XHR o il fallimento di promesse).
1580
1580
1581
-
Nota: The exception catcher is good for catching and reacting to specific exceptions from calls that you know may throw one. For example, when making an XHR call to retrieve data from a remote web service and you want to catch any exceptions from that service and react uniquely.
1581
+
Nota: Il ricevitore di eccezioni è buopno per ricevere e reagire a specifiche eccezioni da chiamate che sai ne possono generare una. Per esempio, quando fai una chiamata XHR per il recupero di dati da un servizio di un server web remoto e vuoi ricevere qualsiasi eccezione da ciò e reagire univocamente.
1582
1582
1583
1583
```javascript
1584
1584
/* raccomandato */
@@ -1602,21 +1602,21 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
1602
1602
}
1603
1603
```
1604
1604
1605
-
### Route Errors
1605
+
### Errori di routing
1606
1606
1607
-
- Handle and log all routing errors using [`$routeChangeError`](https://docs.angularjs.org/api/ngRoute/service/$route#$routeChangeError).
1607
+
- Gestisti e fai il log di tutti gli errori di routing usando [`$routeChangeError`](https://docs.angularjs.org/api/ngRoute/service/$route#$routeChangeError).
1608
1608
1609
-
*Perché?*: Provides a consistent way handle all routing errors.
1609
+
*Perché?*: Fornisce un modo consistente di gestire tutti gli errori di routing.
1610
1610
1611
-
*Perché?*: Potentially provides a better user experience if a routing error occurs and you route them to a friendly screen with more details or recovery options.
1611
+
*Perché?*: Potenzialmente fornisce una migliore esperienza all'utente se si verifica un errore di routing e li puoi indirizzare ad una schermata di aiuto o con opzioni di recupero.
1612
1612
1613
1613
```javascript
1614
1614
/* raccomandato */
1615
1615
functionhandleRoutingErrors() {
1616
1616
/**
1617
-
* Route cancellation:
1618
-
* On routing error, go to the dashboard.
1619
-
* Provide an exit clause if it tries to do it twice.
1617
+
* Annullamento del route:
1618
+
* Su un errore di routing, vai alla dashboard.
1619
+
* Fornisci una clausola di uscita se tenta di farlo per una seconda volta.
1620
1620
*/
1621
1621
$rootScope.$on('$routeChangeError',
1622
1622
function(event, current, previous, rejection) {
@@ -1627,6 +1627,10 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
1627
1627
* Optionally log using a custom service or $log.
1628
1628
* (Don't forget to inject custom service)
1629
1629
*/
1630
+
/**
1631
+
* A scelta fai il log usando un servizio ad hoc o $log.
1632
+
* (Non dimenticare di iniettare il servizio ad hoc)
0 commit comments