Currently when testing a component using `TestBed.createComponent`, we always create the component as a `div` which isn't aligned with the runtime. The runtime tries to parse out the tag name from the first selector in `@Component` and only falls back to `div` if there isn't one. This behavior difference can cause components to not behave like they would in production which reduces the usefulness of the tests.
These changes add the `inferTagName` option to `TestBed.createComponent` and `TestBed.configureTestingModule` that allows apps to opt into inferring the tag name from the selector in the same way as the runtime. Currently the new option is set to `false`, but we intend to change it to `true` in a future version.
PR Close#62283
Introduces a new guide for setting up the Angular CLI's Model Context Protocol (MCP) server.
The guide includes:
- Instructions on how to use the command.
- IDE-specific JSON configurations for VS Code, JetBrains, Firebase Studio, and Cursor.
- Clarification on the different JSON structures required by each IDE.
PR Close#62746
Enables configuration of the updateViaCache setting for service worker registration, allowing greater control over caching behavior during updates. Extends tests to cover new option and ensures correct propagation in registration logic.
PR Close#62721
Add transfer state tab, which is taking transfer state script by using APP_ID. Created internal api ɵgetTransferState to retrieve transfer state value from app into devtools app.
PR Close#62465
Allow binding to ARIA attributes using property binding syntax _without_
the `attr.` prefix. For example, `[aria-label]="expr"` is now valid, and
equivalent to `[ariaLabel]="expr"`. Both examples bind to either a
matching input or the `aria-label` HTML attribute, rather than the
`ariaLabel` DOM property.
Binding ARIA properties as attributes will ensure they are rendered
correctly on the server, where the emulated DOM may not correctly
reflect ARIA properties as attributes.
Reuse the DOM schema registry from the compiler to map property names in
type check blocks.
PR Close#62630
By default this is 4 seconds. In CI we have unreliable runtime performance so we this change gives us a bit of wiggle room to validate application behaviour.
PR Close#62726
This was causing some unintended behaviour when paired with our new zoneless configuration. I'm not sure why currentlyMatchedIndex was getting set to -1 here. With this removed it seems like things are working as expected. Previously a select call would reset this index *after* a search filter was applied, which would cause weird behaviour with the "next" and "prev" buttons.
PR Close#62727
One common problem encountered by the devtools content script is that it accepted almost any message send over the message bus. Some websites like `auth.openai.com` were spamming the bus and DDOS the devtools app.
By introducing event tagging and skipping non-devtools events we prevent DDOS of the Angular devtools content script by on forward tagged events.
PR Close#62645
changes code snippet on first-app tutorials (https://angular.dev/tutorials/first-app/09-services) for the step "Add a new file level import for the HousingService:" from
imports: [HousingLocation],
to
import {HousingService} from '../housing.service';
PR Close#62720
When using `hasValue()` I would expect it to behave like any other
reactive value such that changes to the internal `value()` that do not
cause `hasValue()` to return anything different do not trigger change
detection, but this was not the case. This change wraps the value
checking in a `computed` such that it behaves as expected again while
still preserving the type narrowing.
PR Close#62595
This fix also matches the implementation to the jsdoc for `hasDirectiveDependencies` "Whether any of the component's dependencies are directives"
fixes#62573
PR Close#62666