Skip to content
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

Translate Routing [DONE] #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/v2/guide/routing.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
title: Routing
title: Rutare
type: guide
order: 501
---

## Official Router
## Routerul Oficial

For most Single Page Applications, it's recommended to use the officially-supported [vue-router library](https://github.com/vuejs/vue-router). For more details, see vue-router's [documentation](https://router.vuejs.org/).
Pentru majoritatea Aplicațiilor pe o Singură Pagină (SPA), este recomandat să folosiți biblioteca oficială [vue-router](https://github.com/vuejs/vue-router). Pentru mai multe detalii consultați [documentația](https://router.vuejs.org/) bibliotecii vue-router.

## Simple Routing From Scratch
## Rutare Simplă de la Zero

If you only need very simple routing and do not wish to involve a full-featured router library, you can do so by dynamically rendering a page-level component like this:
Dacă aveți nevoie doar de o rutare foarte simplă și nu doriți să implicați o bibliotecă complexă de rutare, puteți face acest lucru prin rendarea dinamică a unei componente la nivel de pagină, cum ar fi aceasta:

``` js
const NotFound = { template: '<p>Page not found</p>' }
const Home = { template: '<p>home page</p>' }
const About = { template: '<p>about page</p>' }
const NotFound = { template: '<p>Pagina nu a fost găsită</p>' }
const Home = { template: '<p>pagina prinicpală</p>' }
const About = { template: '<p>despre noi</p>' }

const routes = {
'/': Home,
Expand All @@ -36,8 +36,8 @@ new Vue({
})
```

Combined with the HTML5 History API, you can build a very basic but fully-functional client-side router. To see that in practice, check out [this example app](https://github.com/chrisvfritz/vue-2.0-simple-routing-example).
Combinând cu API-ul History din HTML5, puteți crea un router primar, dar complet funcțional. Pentru a vedea acest lucru în practică, verificați [acest exemplu de aplicație](https://github.com/chrisvfritz/vue-2.0-simple-routing-example).

## Integrating 3rd-Party Routers
## Integrarea Routerelor Terțe

If there's a 3rd-party router you prefer to use, such as [Page.js](https://github.com/visionmedia/page.js) or [Director](https://github.com/flatiron/director), integration is [similarly easy](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/compare/master...pagejs). Here's a [complete example](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/tree/pagejs) using Page.js.
Dacă există un router terț pe care preferați să îl utilizați, cum ar fi [Page.js](https://github.com/visionmedia/page.js) sau [Director](https://github.com/flatiron/director), integrarea este [la fel de ușoară](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/compare/master...pagejs). Aici urmează un [exemplu complet](https://github.com/chrisvfritz/vue-2.0-simple-routing-example/tree/pagejs) folosind Page.js.