This has been deprecated to keep selector consistent with other core Angular selectors. As element selectors are in kebab-case.
Now deprecated:
```
<ngForm #myForm="ngForm">
```
After:
```
<ng-form #myForm="ngForm">
```
You can also choose to supress this warnings by providing a config for `FormsModule` during import:
```ts
imports: [
FormsModule.withConfig({warnOnDeprecatedNgFormSelector: 'never'});
]
Closes: #23678
PR Close#23721
Previously, some of the *Def symbols were not exported or were exported
as public API. This commit ensures every definition type is in the
private export namespace.
PR Close#24862
This commit moves the compiler compliance tests into compiler-cli,
and uses ngtsc to run them instead of the custom compilation
pipeline used before. Testing against ngtsc allows for validation
of the real compiler output.
This commit also fixes a few small issues that prevented the tests
from passing.
PR Close#24862
Within an @NgModule it's common to include in the imports a call to
a ModuleWithProviders function, for example RouterModule.forRoot().
The old ngc compiler was able to handle this pattern because it had
global knowledge of metadata of not only the input compilation unit
but also all dependencies.
The ngtsc compiler for Ivy doesn't have this knowledge, so the
pattern of ModuleWithProviders functions is more difficult. ngtsc
must be able to determine which module is imported via the function
in order to expand the selector scope and properly tree-shake
directives and pipes.
This commit implements a solution to this problem, by adding a type
parameter to ModuleWithProviders through which the actual module
type can be passed between compilation units.
The provider side isn't a problem because the imports are always
copied directly to the ngInjectorDef.
PR Close#24862
This change turns on preserve-symlinks in nodejs to verify hermeticity of the Angular build.
BREAKING CHANGE: Use of @angular/bazel rules now requires calling ng_setup_workspace() in your WORKSPACE file.
For example:
local_repository(
name = "angular",
path = "node_modules/@angular/bazel",
)
load("@angular//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()
PR Close#24881
InjectorDef is parameterized on the type of the injector
configuration class (e.g. the @NgModule decorated type). Previously
this parameter was not included when generating .d.ts files that
contained InjectorDefs.
PR Close#24738
The reporter was added in 87d56acda, with the purpose of fixing
source-map paths (which was apparently needed back then). Things have
moved around a lot since then and the custom reporter doesn't seem to be
necessary any more. By removing the reporter, we have one less thing to
worry about while upgrading karma; plus we get improvements in built-in
reporters for free.
Output with the custom reporter:
```
at someMethod (packages/core/.../some-file.ts:13:37)
```
Output with the built-in reporter:
```
at someMethod (packages/core/.../some-file.ts:13.37 <- dist/all/@angular/core/.../some-file.js:1:337)
```
PR Close#24803
Due to changes in karma@1.0.0, `internal-angular` karma reporter stopped
showing browser logs (such as `console.log()` etc.).
Related to d571a5173.
PR Close#24803
With these changes, the types are a little stricter now and also not
compatible with Protractor's jasmine-like syntax. So, we have to also
use `@types/jasminewd2` for e2e tests (but not for non-e2e tests).
I also had to "augment" `@types/jasminewd2`, because the latest
typings from [DefinitelyTyped][1] do not reflect the fact that the
`jasminewd2` version (v2.1.0) currently used by Protractor supports
passing a `done` callback to a spec.
[1]: 566e039485/types/jasminewd2/index.d.ts (L9-L15)Fixes#23952Closes#24733
PR Close#19904
The js_expected_symbol_test implementation extracts symbols names
from a rollup iife bundle. Previously, it only handled the case
with a simple 'var bundle = ...;' statement.
Sometimes, rollup produces a more complex bundle, where the 'bundle'
variable is not the only top-level variable declared in the same
declaration statement. This commit patches the symbol exctractor
to support this more complex case.
Additionally, when the symbol test fails, it prints a command to
accept the symbol diff. This command needs to include the
--define=compile flag to ensure the diff is applied in the same
compile mode as the test was run.
PR Close#24677
This will allow RouterTestingModule to better support lazy loading of modules
when using summaries, since it can detect whether a module is already loaded
if it can access the id.
PR Close#24258