GithubHelp home page GithubHelp logo

Comments (3)

kennyhyun avatar kennyhyun commented on July 19, 2024 1

Since the base tag in the index.html needs to be customised,
and changing routing after first page loaded is not the case,
I think this is a problem.
I am closing issue but please give a thought of changing '.' into '/'.

from angular-starter.

kennyhyun avatar kennyhyun commented on July 19, 2024

since paths starting with / is banned,
https://github.com/angular/vladivostok/blob/master/CHANGELOG.md#breaking-changes

router get the last name from the path and find files relative to the path.

editing base tag in the index.html resolved it .

<base href="/">

BTW,
when I was googling and search for Angular2 source, I found those comments in @angular/common/src/location_strategy.js

so I added {provide: APP_BASE_HREF, useValue: '/'} in bootstrap but didn't change anything:(

/**
 * The `APP_BASE_HREF` token represents the base href to be used with the
 * {@link PathLocationStrategy}.
 *
 * If you're using {@link PathLocationStrategy}, you must provide a provider to a string
 * representing the URL prefix that should be preserved when generating and recognizing
 * URLs.
 *
 * ### Example
 *
 * ```
 * import {Component} from '@angular/core';
 * import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from '@angular/router';
 * import {APP_BASE_HREF} from '@angular/common';
 *
 * @Component({directives: [ROUTER_DIRECTIVES]})
 * @RouteConfig([
 *  {...},
 * ])
 * class AppCmp {
 *   // ...
 * }
 *
 * bootstrap(AppCmp, [
 *   ROUTER_PROVIDERS,
 *   {provide: APP_BASE_HREF, useValue: '/my/app'}
 * ]);
 * ```
 * @stable
 */ 

from angular-starter.

antonybudianto avatar antonybudianto commented on July 19, 2024

I use '.' as a workaround for github page (maybe fixed in new router now...), I'll update it
Thanks for the catch! @kennyhyun

from angular-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.