Skip to content

fix(common): do not reference deprecated classes in providers - #14523

Merged
IgorMinar merged 1 commit into
angular:masterfrom
chuckjaz:issue14521
Feb 24, 2017
Merged

IgorMinar merged 1 commit into
angular:masterfrom
chuckjaz:issue14521

Conversation

@chuckjaz

@chuckjaz chuckjaz commented Feb 16, 2017 •

Copy link
Copy Markdown
Contributor

References to NgFor are now an alias for NgForOf instead of a derived class.

Fixes #14521

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix

What is the current behavior? (You can also link to an open issue here)

The compiler will generate references to the deprecated class NgFor because the NgFor is reference in the provider for NgForOf<T>.

What is the new behavior?

The compiler no longer generates references to the deprecated NgFor class.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

@vicb

vicb commented Feb 16, 2017

Copy link
Copy Markdown
Contributor

Do we need to keep NgFor then ?
Would export const NgFor = NgForOf work ? If not may be add a 'before/after` code snippet to the commit message.

petebacondarwin added a commit to angular/dgeni-packages that referenced this pull request Feb 16, 2017
When aliasing a class one must create two declarations for a symbol:

```
class OriginalClass {}
const AliasedClass = OriginalClass;
type AliasedClass = OriginalClass;
```

Previously we were looking for the type on the value definition (i.e.
the `const`), and not finding it. Now if the type is not found on the
value definition then we search the other declarations for the first
to have a `type` property.

Related to angular/angular#14523

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

const testDirective = fixture.debugElement.query(By.directive(TestDirective));

Why not inject both in the td ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also query seems to return the DebugElement and not TestDirective

…r#14523)

References to `NgFor` are now an alias for `NgForOf` instead of a
derived class.

Fixes angular#14521
@IgorMinar
IgorMinar merged commit a23634d into angular:master Feb 24, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
…r#14523) (angular#14523)

References to `NgFor` are now an alias for `NgForOf` instead of a
derived class.

Fixes angular#14521
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
…r#14523) (angular#14523)

References to `NgFor` are now an alias for `NgForOf` instead of a
derived class.

Fixes angular#14521
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler generates references to a deprecated class.

4 participants