angular2-routing

    -1热度

    1回答

    我有点不好意思地承认,我刚刚花了更多的时间固定的恐惧问题: **Syntax Error: Unexpected token <** 我的错误是,我忘了以下内容添加到我的index.html: <script src="node_modules/angular2/bundles/router.dev.js"></script> 但是我包括: <script src="node_module

    3热度

    1回答

    我要清除浏览器导航历史angular2让用户获取后导航到特定页面(我的兴趣)的不应该能够通过点击浏览器后退或下一个按钮返回或前进...... 。 现在我试图导入Angular2位置这样 import {Location} from "angular2/router"; ,并使用它像这样以防止导航 this._location.replaceState('/'); //clear browser

    2热度

    1回答

    我目前正试图让我的angular2应用程序打开一个弹出如果我去一个特定的网址。 例子:mywebsite.com/register 应该直接与注册弹出打开一个网页。 目前我有: main.html中 <header></header> <body-cmp></body-cmp> <div class="row"> <button md-raised-button class="m

    6热度

    1回答

    我有一个路由配置 @RouteConfig([ { path: '/', name: 'Start', component: Journal }, { path: '/register', name: 'Register', component: Register }, { path: '/login', name: 'Login', component: Login

    1热度

    1回答

    我有一点麻烦这里了解逻辑 根组件 import { Component } from "angular2/core"; import { TopNavigationComponent } from "./shared/navigation.component"; import { ArcListComponent } from "./arc/arc-list.component"; impo

    0热度

    2回答

    一些可能的组件正在花费时间加载到<router-outlet></router-outlet>,所以我想在RouterOutlet中显示加载器,并在隐藏加载器后等待组件完全加载以及显示组件。 我该如何做到这一点?他们的任何内置功能都可以在RouterOutLet中添加对加载程序的支持

    2热度

    2回答

    我试图用isRouteActive功能在点击其中包含的链接到active类li元素的开关读取属性“isRouteActive”的定义,但它一直给我像TypeError: Cannot read property 'isRouteActive' of undefined in [isRouteActive(['./Home']) in [email protected]:16]错误。该文件看起来像下

    0热度

    1回答

    在我的angular2应用程序中,我有一个通过路由加载的一堆子组件的外壳组件。 import {Component} from 'angular2/core'; import {Router, Route, RouteConfig, Location, ROUTER_DIRECTIVES, OnActivate, ComponentInstruction} from 'angular2/rout

    4热度

    2回答

    我正在关注Angular2文档中的简单快速入门应用程序,并且我使用了Spring后端来运行它。我的问题是角度路由器从URL中删除hashtag,所以应该是example.com/#/dashboard现在是example.com/dashboard。 我正在使用StackOverflow上一堆帖子中指定的LocationStrategy方法。下面是我简单的例子: File: main.ts ///

    1热度

    2回答

    当我试图添加hashlocationstrategy boot.ts ///<reference path="../typings/browser.d.ts"/> import { bootstrap } from "angular2/platform/browser"; import { RootComponent } from "./root.component"; import {