Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrapping apps with `selector: '#app'` in `app.component.ts` is not working any more after upgrading to 9.0.0 #33485

Closed
JounQin opened this issue Oct 30, 2019 · 5 comments

Comments

@JounQin
Copy link

@JounQin JounQin commented Oct 30, 2019

馃悶 bug report

Affected Package

The issue is caused by package `@angular/core` or `@angular/compiler` ? I don't know exactly.

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Yes, in 8.0.0, it does work.

Description

A clear and concise description of the problem...

As title, when I'm using #app, it complains about selctor 'app' not found.

馃敩 Minimal Reproduction

https://stackblitz.com/...

馃敟 Exception or Error





馃實 Your Environment

Angular Version:





Anything else relevant?

@trotyl

This comment has been minimized.

Copy link
Contributor

@trotyl trotyl commented Oct 30, 2019

This is a combination result of #23811 (comment) and #11885, ID selector can never be correctly parsed in Angular compiler, but root element only make use of unparsed (raw) selector. @mhevery please do consider this as regression.

@IgorMinar

This comment has been minimized.

Copy link
Member

@IgorMinar IgorMinar commented Oct 31, 2019

repro:

application.component.ts:

import { Component } from '@angular/core';

@Component({
  selector: '#app-root', // uses ID selector which used to be supported in v8/VE
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'v9-test';
}

index.html:

...
<body>
  <div id=app-root></div>
</body>
...
@IgorMinar

This comment has been minimized.

Copy link
Member

@IgorMinar IgorMinar commented Nov 1, 2019

The issue doesn't repro in Jit mode (https://stackblitz.com/edit/angular-xth7wc) but does repro locally with CLI.

@trotyl

This comment has been minimized.

Copy link
Contributor

@trotyl trotyl commented Nov 2, 2019

The issue doesn't repro in Jit mode (https://stackblitz.com/edit/angular-xth7wc) but does repro locally with CLI.

@IgorMinar This is an Ivy issue, StackBlitz doesn't support Ivy yet even when using v9. The issue happens in both AOT and JIT (of Ivy).

@IgorMinar IgorMinar changed the title `selector: '#app'` in `app.component.ts` is not working any more after upgrading to 9.0.0 bootstrapping apps with `selector: '#app'` in `app.component.ts` is not working any more after upgrading to 9.0.0 Nov 9, 2019
@IgorMinar

This comment has been minimized.

Copy link
Member

@IgorMinar IgorMinar commented Nov 9, 2019

@trotyl dang, you are right. I thought I hacked stackblitz enough to get to to run ivy in JIT mode, but that was not the case.

@IgorMinar IgorMinar modified the milestones: v9-candidates, v9-blockers Nov 9, 2019
@mhevery mhevery self-assigned this Nov 13, 2019
mhevery added a commit to mhevery/angular that referenced this issue Nov 13, 2019
@mhevery mhevery mentioned this issue Nov 13, 2019
4 of 14 tasks complete
mhevery added a commit to mhevery/angular that referenced this issue Nov 13, 2019
@alxhub alxhub closed this in ab0bcee Nov 15, 2019
alxhub added a commit that referenced this issue Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.