@ngrx/router

WebJar for @ngrx/router

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-ngrx-router
Последняя версия

Последняя версия

1.0.0-beta.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

@ngrx/router
WebJar for @ngrx/router
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/ngrx/router

Скачать github-com-ngrx-router

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-ngrx-router/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-ngrx-router</artifactId>
    <version>1.0.0-beta.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-ngrx-router/
implementation 'org.webjars.npm:github-com-ngrx-router:1.0.0-beta.2'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-ngrx-router/
implementation ("org.webjars.npm:github-com-ngrx-router:1.0.0-beta.2")
'org.webjars.npm:github-com-ngrx-router:jar:1.0.0-beta.2'
<dependency org="org.webjars.npm" name="github-com-ngrx-router" rev="1.0.0-beta.2">
  <artifact name="github-com-ngrx-router" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-ngrx-router', version='1.0.0-beta.2')
)
libraryDependencies += "org.webjars.npm" % "github-com-ngrx-router" % "1.0.0-beta.2"
[org.webjars.npm/github-com-ngrx-router "1.0.0-beta.2"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : path-to-regexp jar [1.2.1,2)
org.webjars.npm : query-string jar [4.1.0,5)

Модули Проекта

Данный проект не имеет модулей.

@ngrx/router

This project is DEPRECATED

The Angular 2 Router was inspired by the ngrx/router, shares a familiar API and will be updated going forward. The ngrx/router may continue to live on as a framework agnostic router with more experimental features.

Migration Guide to Angular Router

Reactive Router for Angular 2

npm version

This is an alternative router for Angular 2 focused on providing a simple, reactive API built to scale for large applications.

Please note that we are currently in beta. We believe the core of the router is solid and we do not expect anymore breaking changes to the API.

Installation

Install @ngrx/router and @ngrx/core into your Angular 2 project via npm:

npm install @ngrx/router @ngrx/core --save

Routing Setup

  1. Create your application components:
import { Component } from '@angular/core';

@Component({
  selector: 'app',
  template: `
    <h1>My Blog</h1>
    <nav>
      <a linkTo="/">Home</a>
      <a linkTo="/blog">Blog</a>
    </nav>

    <route-view></route-view>
  `
})
class App { }

@Component({
  selector: 'home-page',
  template: `
    <h2>Home Page</h2>
  `
})
class HomePage { }

@Component({
  selector: 'blog-page',
  template: `
    <h2>Blog</h2>
    <nav>
      <a *ngFor="let post of posts" [linkTo]="'/blog/' + post.id">{{ post.title }}</a>
    </nav>

    <route-view></route-view>
  `
})
class BlogPage { }

@Component({
  selector: 'post-page',
  template: `
    <h3>Post</h3>
  `
})
class PostPage { }
  1. Configure your application routes:
import { Routes } from '@ngrx/router';

const routes: Routes = [
  {
    path: '/',
    component: HomePage
  },
  {
    path: '/blog',
    component: BlogPage,
    children: [
      {
        path: ':id',
        component: PostPage
      }
    ]
  }
]
  1. Register router in application bootstrap.
import { provideRouter } from '@ngrx/router';

bootstrap(App, [
  provideRouter(routes)
]);

That's it! You are ready to begin taking advantage of reactive routing!

Documentation

org.webjars.npm

ngrx

Reactive Extensions for Angular

Версии библиотеки

Версия
1.0.0-beta.2