Skip to content

fix: do not add ROUTER_PROVIDERS on generation. #565

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

Merged
merged 1 commit into from
Apr 30, 2016

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Apr 29, 2016

No description provided.

import {environment} from './app/environment';
import {<%= jsComponentName %>App} from './app/<%= htmlComponentName %>.component';

if (environment.production) {
enableProdMode();
}

bootstrap(<%= jsComponentName %>App);
bootstrap(<%= jsComponentName %>App, [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add them here? the style guide advice (and from Igor) has been to not add providers in the main bootstrap, but instead to put them in the root app component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with that too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. That would be great to move this to the root app component, so we stay in sync

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -1,17 +1,13 @@
import {Component} from 'angular2/core';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component still has a router-outlet, which means it needs ROUTER_DIRECTIVES I believe.

Copy link
Contributor Author

@hansl hansl Apr 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done (locally).

@hansl hansl force-pushed the route-fix branch 3 times, most recently from edc7d57 to 9ce096e Compare April 29, 2016 22:59
@hansl
Copy link
Contributor Author

hansl commented Apr 29, 2016

@filipesilva: Please take another look. It passes the tests now.

@hansl hansl merged commit 69cdb28 into angular:master Apr 30, 2016
@hansl hansl deleted the route-fix branch April 30, 2016 00:05
@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 9, 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

Successfully merging this pull request may close these issues.

3 participants