Skip to content

Router outlet broken #272

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

Closed
mrynthom opened this issue Mar 3, 2016 · 3 comments
Closed

Router outlet broken #272

mrynthom opened this issue Mar 3, 2016 · 3 comments

Comments

@mrynthom
Copy link

mrynthom commented Mar 3, 2016

By running the default install
ng new project
cd project
ng serve

The webpage is populated with project Works! but doesn't fill in the router outlet. This is the same as
#166 but the ordering doesn't seem to solve it, and is following the latest from the quick start.

System
Darwin 14.5
Node v5.7.0
Npm v 3.6.0

@filipesilva
Copy link
Contributor

You're absolutely right - but it is actually intended in the base app.

This is because the generated app is ready to render routeable components in the outlet, but starts with none whatsoever.

If you follow the instructions here (generating a route and adding it to @RouteConfig), you should see the outlet being populated when at that route.

If this does not happen though, then there is definitely something wrong.

@wollio
Copy link

wollio commented May 28, 2016

Hello @filipesilva

I ran exactly in the same error, when I installed angular-cli via npm and tried do generate some routes.
I fixed it by adding:

import {Router} from '@angular/router';

...

constructor(private router: Router) {
}

to my main-component in the app folder.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants