Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6a97016
build: use wombat-dressing-room proxy for publishing releases (#42357)
zarend May 26, 2021
acfa064
fix(dev-infra): build with stamping for release builds (#42354)
josephperrott May 26, 2021
c110d05
release: cut the v12.1.0-next.3 release (#42360)
zarend May 26, 2021
74ebdf6
docs: refactor `HeroDetailComponent` and unit test (#42349)
swseverance May 26, 2021
0166391
docs: edit project structure description (#42346)
belgoros May 26, 2021
caf15da
docs: fix `BannerComponent` unit tests (#42336)
swseverance May 25, 2021
da1a868
docs: add missing `await` to `BannerComponent` unit test (#42336)
swseverance May 26, 2021
40bbcaa
docs: move and update browser compatibility docs to browser-support g…
IgorMinar May 25, 2021
38b0e71
docs: move the schematics under Angular Tools menu section (#42332)
IgorMinar May 25, 2021
14abc68
docs(common): rewrite docs for NgForOf#ngForTrackBy (#42329)
IgorMinar May 25, 2021
b2eab97
docs: remove `entryComponents` references from the custom elements gu…
AndrewKushnir May 25, 2021
de8a6ae
docs: add example that exports a part of an animation for reuse (#42321)
May 25, 2021
bd51762
docs: add section on binding to passive events (#42292)
May 24, 2021
a787f78
test: clean up internal testing utilities (#42177)
crisbeto May 23, 2021
33e1a18
build(docs-infra): allow only Node.js v14 and above (#42093)
lacolaco May 14, 2021
9193ea2
docs: clarify providedIn options (#42355)
atscott May 26, 2021
4e9b61a
docs: remove/update broken links in resources appearing on aio (#42232)
josephperrott May 21, 2021
4cb11cc
docs: add note about why module import order is important (#42323)
atscott May 25, 2021
1572659
ci: update the github feature request process action and run on cron …
mgechev May 25, 2021
bcfe4af
docs: clarify that `forRoot` can be called in other modules (#42361)
atscott May 26, 2021
516923e
docs: clarify when the `ngDoBootstrap` hook is invoked (#42362)
AndrewKushnir May 26, 2021
44027c4
build: allow node v15 and above for aio (#42367)
zarend May 26, 2021
e917d57
docs: use `json` pipe in Forms guide instead of a temporary diagnosti…
AndrewKushnir May 26, 2021
74186c3
docs: remove lightbox gif from Use Directives to Watch the DOM sectio…
May 26, 2021
141791e
docs: add a note about the ngc command and command line options (#42373)
IgorMinar May 26, 2021
7a6358b
docs: add note to clarify that ngOnChanges is only called if inputs a…
atscott May 26, 2021
d74d130
docs: improve preloading component data chapter (#42340)
AndrewKushnir May 26, 2021
38378ce
docs: explain what a deploy url is and how it differs from a base hre…
wagnermaciel May 26, 2021
e87dbaf
docs: fix a typo (#42384)
fusho-takahashi May 27, 2021
17d0dd3
docs: update links to Testing Component Scenarios page (#42385)
swseverance May 27, 2021
b57a127
docs: fix typos in the `cli-builder` guide (#42386)
gkalpak May 27, 2021
deb8930
build(docs-infra): remove unused `spy-directive.gif` image (#42388)
gkalpak May 27, 2021
306f7ac
docs: cherry pick release notes for 12.0.2 to main (#42390)
atscott May 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,14 @@ jobs:
command: 'openssl aes-256-cbc -d -in .circleci/github_token -md md5 -k "${KEY}" -out ~/.git_credentials'
- run: ./scripts/ci/publish-build-artifacts.sh

aio_misc:
executor: default-executor
steps:
- custom_attach_workspace
- run:
name: Check website provided in contributors.json file
command: yarn node aio/scripts/test-external-urls.js

aio_monitoring_stable:
executor: default-executor
steps:
Expand Down Expand Up @@ -879,6 +887,9 @@ workflows:
monitoring:
jobs:
- setup
- aio_misc:
requires:
- setup
- aio_monitoring_stable:
requires:
- setup
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/feature-requests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Feature request triage bot

on: [workflow_dispatch]
on:
schedule:
# Run at 14:00 every day
- cron: '0 14 * * *'

jobs:
feature_triage:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/feature-request@698f598d8a5ebc6917989512e8a3defc830ac06f
- uses: angular/dev-infra/github-actions/feature-request@a3fb5e24b659411f1163461a778a1fa79e119d2f
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
limit: 50
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
<a name="12.0.2"></a>
# 12.0.2 (2021-05-26)
### forms
| Commit | Description |
| -- | -- |
| 19d7bf4162 | fix(forms): Add float number support for min and max validator (#42223) |
### migrations
| Commit | Description |
| -- | -- |
| 11c7bec065 | fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214) |
### platform-browser
| Commit | Description |
| -- | -- |
| 84ab81c286 | fix(platform-browser): update started state on reset (#41608) |
## Special Thanks:
Alan Agius, Andrew Scott, David Shevitz, George Kalpakas, Igor Minar, Joey Perrott, Kapunahele Wong, Madleina Scheidegger, Paul Gschwendtner, Pete Bacon Darwin, Sam Severance, Teri Glover, Zach Arend, chenyunhsin, iRealNirmal, mgechev and twerske

<a name="12.1.0-next.3"></a>
# 12.1.0-next.3 (2021-05-26)
### forms
| Commit | Description |
| -- | -- |
| 3d9062dad7 | fix(forms): Add float number support for min and max validator (#42223) |
### migrations
| Commit | Description |
| -- | -- |
| 7f6213a2f4 | fix(migrations): add migration to replace `/deep/` with `::ng-deep` (#42214) |
### platform-browser
| Commit | Description |
| -- | -- |
| 3a6af8e629 | fix(platform-browser): update started state on reset (#41608) |
## Special Thanks:
Alan Agius, Andrew Scott, David Shevitz, George Kalpakas, Igor Minar, Joey Perrott, Kapunahele Wong, Madleina Scheidegger, Paul Gschwendtner, Pete Bacon Darwin, Renovate Bot, Sam Severance, Teri Glover, Zach Arend, chenyunhsin, iRealNirmal, mgechev and twerske


<a name="12.1.0-next.2"></a>
# 12.1.0-next.2 (2021-05-19)
### common
Expand Down
24 changes: 21 additions & 3 deletions aio/content/examples/animations/src/app/animations.1.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
// #docregion
import { animation, style, animate } from '@angular/animations';
// #docplaster
// #docregion animation-const, trigger-const
import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
// #enddocregion trigger-const

export const transAnimation = animation([
export const transitionAnimation = animation([
style({
height: '{{ height }}',
opacity: '{{ opacity }}',
backgroundColor: '{{ backgroundColor }}'
}),
animate('{{ time }}')
]);
// #enddocregion animation-const

// #docregion trigger-const
export const triggerAnimation = trigger('openClose', [
transition('open => closed', [
useAnimation(transitionAnimation, {
params: {
height: 0,
opacity: 1,
backgroundColor: 'red',
time: '1s'
}
})
])
]);
// #enddocregion trigger-const
2 changes: 0 additions & 2 deletions aio/content/examples/animations/src/app/animations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// #docregion reusable
import {
animation, trigger, animateChild, group,
transition, animate, style, query
Expand All @@ -12,7 +11,6 @@ export const transAnimation = animation([
}),
animate('{{ time }}')
]);
// #enddocregion reusable

// Routable animations
// #docregion route-animations
Expand Down
5 changes: 0 additions & 5 deletions aio/content/examples/elements/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ import { AppComponent } from './app.component';
import { PopupComponent } from './popup.component';
import { PopupService } from './popup.service';

// Include the `PopupService` provider,
// but exclude `PopupComponent` from compilation,
// because it will be added dynamically.

@NgModule({
imports: [BrowserModule, BrowserAnimationsModule],
providers: [PopupService],
declarations: [AppComponent, PopupComponent],
bootstrap: [AppComponent],
entryComponents: [PopupComponent],
})
export class AppModule {
}
2 changes: 2 additions & 0 deletions aio/content/examples/forms/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// #docregion
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
Expand All @@ -9,6 +10,7 @@ import { HeroFormComponent } from './hero-form/hero-form.component';
@NgModule({
imports: [
BrowserModule,
CommonModule,
FormsModule
],
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h1>Hero Form</h1>
<form #heroForm="ngForm">
<!-- #enddocregion template-variable-->
<!-- #docregion ngModel-2-->
{{diagnostic}}
{{ model | json }}
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export class HeroFormComponent {
// #enddocregion submitted

// #enddocregion final
// TODO: Remove this when we're done
get diagnostic() { return JSON.stringify(this.model); }
// #enddocregion v1

// #docregion final, new-hero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,27 @@ describe('BannerComponent (external files)', () => {
let fixture: ComponentFixture<BannerComponent>;
let h1: HTMLElement;

describe('setup that may fail', () => {
// #docregion setup-may-fail
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ BannerComponent ],
}); // missing call to compileComponents()
fixture = TestBed.createComponent(BannerComponent);
});
// #enddocregion setup-may-fail

it('should create', () => {
expect(fixture.componentInstance).toBeDefined();
});
});

describe('Two beforeEach', () => {
// #docregion async-before-each
beforeEach(async () => {
TestBed
.configureTestingModule({
declarations: [BannerComponent],
})
.compileComponents(); // compile template and css
await TestBed.configureTestingModule({
declarations: [ BannerComponent ],
}).compileComponents(); // compile template and css
});
// #enddocregion async-before-each

Expand All @@ -37,7 +50,7 @@ describe('BannerComponent (external files)', () => {
// #docregion one-before-each
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [BannerComponent],
declarations: [ BannerComponent ],
}).compileComponents();
fixture = TestBed.createComponent(BannerComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ describe('BannerComponent (inline template)', () => {
let fixture: ComponentFixture<BannerComponent>;
let h1: HTMLElement;

// #docregion configure-and-create
beforeEach(async () => {
await TestBed.configureTestingModule({
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [ BannerComponent ],
});
fixture = TestBed.createComponent(BannerComponent);
// #enddocregion configure-and-create
component = fixture.componentInstance; // BannerComponent test instance
h1 = fixture.nativeElement.querySelector('h1');
// #docregion configure-and-create
});
// #enddocregion setup, configure-and-create
// #enddocregion setup

// #docregion test-w-o-detect-changes
it('no title in the DOM after createComponent()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ function heroModuleSetup() {
// #docregion title-case-pipe
it('should convert hero name to Title Case', () => {
// get the name's input and display elements from the DOM
const hostElement = fixture.nativeElement;
const nameInput: HTMLInputElement = hostElement.querySelector('input');
const nameDisplay: HTMLElement = hostElement.querySelector('span');
const hostElement: HTMLElement = fixture.nativeElement;
const nameInput: HTMLInputElement = hostElement.querySelector('input')!;
const nameDisplay: HTMLElement = hostElement.querySelector('span')!;

// simulate user entering a new name into the input box
nameInput.value = 'quick BROWN fOx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tslint:disable:member-ordering */
// #docplaster
import { Component, Input, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

import { Hero } from '../model/hero';
Expand All @@ -23,7 +23,7 @@ export class HeroDetailComponent implements OnInit {
// #enddocregion ctor
// #enddocregion prototype

@Input() hero!: Hero;
hero!: Hero;

// #docregion ng-on-init
ngOnInit(): void {
Expand Down
11 changes: 11 additions & 0 deletions aio/content/guide/angular-compiler-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,14 @@ When you use the CLI command `ng new --strict`, it is set to `true` in the gener
### `trace`

When `true`, prints extra information while compiling templates. Default is `false`.


{@a cli-options}
## Command Line Options

While most of the time you interact with the Angular Compiler indirectly using Angular CLI, when debugging certain issues, you might find it useful to invoke the Angular Compiler directly.
You can use the `ngc` command provided by the `@angular/compiler-cli` npm package to call the compiler from the command line.

The `ngc` command is just a wrapper around TypeScript's `tsc` compiler command and is primarily configured via the `tsconfig.json` configuration options documented in [the previous sections](#angular-compiler-options).

In addition to the configuration file, you can also use [`tsc` command line options](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to configure `ngc`.
10 changes: 10 additions & 0 deletions aio/content/guide/browser-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ using [Sauce Labs](https://saucelabs.com/) and

</div>


{@a ie11}
## Configuring Angular CLI for compatibility with IE11

While Angular supports all browsers listed above, in order to improve the build times and output, Angular CLI applications don't support IE11 by default.

Angular CLI uses [`browserlist`](https://github.com/browserslist/browserslist) to configure browser support for applications.

You can enable the IE11 support by following the instructions in the `.browserslistrc` file at the root of your project.

## Polyfills

Angular is built on the latest standards of the web platform.
Expand Down
63 changes: 6 additions & 57 deletions aio/content/guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,63 +291,6 @@ To disable these warnings, you can add the CommonJS module name to `allowedCommo
},
</code-example>

{@a browser-compat}

## Configuring browser compatibility

The CLI uses [Autoprefixer](https://github.com/postcss/autoprefixer) to ensure compatibility with different browser and browser versions.
You may find it necessary to target specific browsers or exclude certain browser versions from your build.

Internally, Autoprefixer relies on a library called [Browserslist](https://github.com/browserslist/browserslist) to figure out which browsers to support with prefixing.
Browserlist looks for configuration options in a `browserslist` property of the package configuration file, or in a configuration file named `.browserslistrc`.
Autoprefixer looks for the `browserslist` configuration when it prefixes your CSS.

* You can tell Autoprefixer what browsers to target by adding a browserslist property to the package configuration file, `package.json`:
```
"browserslist": [
"> 1%",
"last 2 versions"
]
```

* Alternatively, you can add a new file, `.browserslistrc`, to the project directory, that specifies browsers you want to support:
```
### Supported Browsers
> 1%
last 2 versions
```

See the [browserslist repo](https://github.com/browserslist/browserslist) for more examples of how to target specific browsers and versions.

### Backward compatibility with Lighthouse

If you want to produce a progressive web app and are using [Lighthouse](https://developers.google.com/web/tools/lighthouse/) to grade the project, add the following `browserslist` entry to your `package.json` file, in order to eliminate the [old flexbox](https://developers.google.com/web/tools/lighthouse/audits/old-flexbox) prefixes:

```
"browserslist": [
"last 2 versions",
"not ie <= 10",
"not ie_mob <= 10"
]
```

### Backward compatibility with CSS grid

CSS grid layout support in Autoprefixer, which was previously on by default, is off by default in Angular 8 and higher.

To use CSS grid with IE10/11, you must explicitly enable it using the `autoplace` option.
To do this, add the following to the top of the global styles file (or within a specific css selector scope):

```
/* autoprefixer grid: autoplace */
```
or
```
/* autoprefixer grid: no-autoplace */
```

For more information, see [Autoprefixer documentation](https://autoprefixer.github.io/).


{@a proxy}

Expand Down Expand Up @@ -534,3 +477,9 @@ function setupForCorporateProxy(proxyConfig) {

module.exports = setupForCorporateProxy(proxyConfig);
```

{@a browser-compat}

## Configuring browser compatibility

See [browser support guide](guide/browser-support).
Loading