当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript service.RouterService类代码示例

本文整理汇总了TypeScript中backlive/service.RouterService的典型用法代码示例。如果您正苦于以下问题:TypeScript RouterService类的具体用法?TypeScript RouterService怎么用?TypeScript RouterService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RouterService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: provideRouter

import {ROUTER_DIRECTIVES, provideRouter} from '@angular/router';
import {RouterService} from 'backlive/service';
import {Route} from './routes';

import {AuthGuard} from './auth.guard';

export const APP_ROUTER_PROVIDERS = [ 
    provideRouter(RouterService.AppRoutes(Route, AuthGuard)),
    AuthGuard
]
开发者ID:urazovm,项目名称:backlive2.0,代码行数:10,代码来源:bootstrap.ts

示例2:

import {Path} from 'backlive/config';

import {DashboardComponent} from './dashboard/dashboard.component';
import {RouteComponentMap} from 'backlive/routes';

/* services */
import {AppService, PopupAlert, RouterService, AuthRouterOutlet, ApiService, UserService} from 'backlive/service';

/* components */
import {BaseComponent, ModalComponent} from 'backlive/component/shared';
import {HeaderNavComponent, SlidingNavComponent, FooterNavComponent} from 'backlive/component/navigation';

/* models */
import {AppEvent, User} from 'backlive/service/model';

RouterService.setRouteMap(RouteComponentMap);

@Component({
    selector: 'backlive-app',
    template: `
      <header class="clearfix">
      	<header-nav></header-nav>
      </header>
      <div id="mainContainer">
          <div class="main clearfix" [class.nav-visible]="isSlidingNavVisible">
              <chart></chart>
              <router-outlet></router-outlet>
          </div>
          <sliding-nav [class.hidden]="!isSlidingNavVisible"></sliding-nav>
      </div>
      <footer>
开发者ID:alincc,项目名称:backlive2.0,代码行数:31,代码来源:test.component.ts

示例3: navigate

 navigate(route: string[]) {
     this.routerService.navigate(route);
 }
开发者ID:alincc,项目名称:backlive2.0,代码行数:3,代码来源:app.component.ts

示例4: getRouteUrl

 getRouteUrl(navItem: NavItem) {
     return this.routerService.getLinkUrl(navItem.route);
 }
开发者ID:urazovm,项目名称:backlive2.0,代码行数:3,代码来源:header-nav.component.ts


注:本文中的backlive/service.RouterService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。