The commit introduce prettier to format some API entries.
For now we'll do only functions are other are a bit more complex because of the support of deprecation.
fixes#59211
PR Close#61154
There were a myriad of problems when using the type: 'cli' for a
tutorial:
* Editor component would flicker the non-cli version first since that
was the default value. Fixed by not showing anything until type is
available
* Editor component still rendered a split screen when there was no
preview. Fixed
* Project initialization was incorrect because the terminal would appear
to be available but really didn't work until dependencies were done
installing. Fixed by sharing initialization with regular project init
and piping the install output to the interactive terminal
* Terminals would not work when going from type: 'cli' to another or
vice versa. This is because the element instance of a terminal cannot
change once it is opened. Fixed by dispoing and recreating terminals
when the element changes
PR Close#61246
fix new global layout issues, and make other pages adhere to the new centered layout like cli ref page, cli ref details, api ref details pages
PR Close#61256
As of Angular 19, `this` should consistently reference the given
class property.
See: https://github.com/angular/angular/pull/55183
Co-authored-by: Jeremy Elbourn <jelbourn@google.com>
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
PR Close#61250
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).
These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!
To improve code quality and keep the existing behavior working, we are
doing the following:
- adding a lint rule that reduces the risk of such imports breaking. The
failure scenario without the rule is that API goldens show unexpected
diffs, and types might be duplicated in a different package!
- keeping the `<amd-module` headers, but we manually insert them into
the package entry-points. This should ensure we don't regress
anywhere; while we also improved general safety around this above.
Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.
PR Close#61312
take the full width of the page for all the pages that use docs-viewer, also reserve an area for table of contents on-demand
Resolves: #52648
PR Close#58831
The `false` behavior has existed for a long time but hasn't really
been documented. It's also not _quite_ what the browser would do.
Finally, the page explicitly discourages the implicit `false` way
of preventing default. Biggest motivation (beyond code clarity) are
potential footguns like `(click)="myProp=x()"` which happens to prevent
default behavior iff `x()` happens to return `false`.
Fixes https://github.com/angular/angular.io/issues/2568
PR Close#61184