Sub topic 4
Inspecting properties, inputs, and outputs
This chapter assumes you have Angular DevTools installed, your app is running in development mode, and you can open the component tree from the previous chapter. You should know what @Input(), @Output(), and the input() and output() functions do.
What the properties panel shows
When you select a component in the component tree, the right side of the DevTools panel shows its properties view. This view is a live snapshot of the component instance. It reads the instance that Angular created, not the template.
The view groups values into sections:
- Inputs: properties that receive data from a parent. This covers both decorator inputs and signal inputs.
- Outputs: events the component can emit to its parent.
- Properties: every other field on the class, such as services, plain fields, and signals.
Objects and arrays have expand arrows. Expand them to walk nested values, in the same way as in the console.
Reading inputs
Take a child component like this:
import { Component, input, output } from '@angular/core';
@Component({
selector: 'app-price-tag',
standalone: true,
template: `
<span>{{ label() }}: {{ amount() }}</span>
<button (click)="added.emit(amount())">Add</button>
`,
})
export class PriceTagComponent {
label = input.required<string>();
amount = input(0);
added = output<number>();
}Select app-price-tag in the tree. Under Inputs you will see label and amount with their current values. If the parent binds [amount]="total", the value you see is what Angular last passed in.
This is the fastest way to answer "Is the parent passing what I think it is?" If the template shows a wrong number, compare the input value here with the value in the parent's properties. The mismatch tells you which side has the bug.
Reading outputs
Outputs appear in their own section. DevTools lists the output names, such as added. It shows that the component declares the output. It does not show a log of emitted values. To see what an output emits, subscribe in code or add a temporary console.log in the parent handler.
Checking property values over time
Properties update when change detection runs. If a value looks stale, the component may not have been checked yet. You can click the refresh behavior of the panel by selecting another node and returning, which re-reads the instance. A value that stays old after a state change often means the component uses OnPush and nothing marked it dirty. A later chapter covers that case.
Common errors
- Empty or missing panel. The app is built in production mode, so Angular does not expose the debug information. Serve with the development configuration.
- Input shows
undefined. The parent has not bound the input yet, or the binding expression evaluates toundefined. Compare it with the parent's own properties. - Signal values look like functions. A signal field is a function. DevTools shows the signal and its current value. In your own console code, you must call it, as in
cmp.amount(). - Wrong component selected. Two instances of the same component can sit in one list. Use the picker in the top-left of the DevTools panel to click the exact element on the page.
Summary of where to look
| Question | Where to look |
|---|---|
| What did the parent pass? | Inputs section |
| Does the component expose this event? | Outputs section |
| What is the internal state? | Properties section |
| Which instance am I looking at? | Element picker |
Visualizing the data flow
Exercise
A child component shows the wrong price on screen. In DevTools, the child's amount input shows 0, but the parent's total property shows 49. Where is the bug most likely to be, and why?
Show answer
The bug is in the binding between parent and child, or in how the parent passes the value. The parent holds the correct value (49) and the child's input did not receive it. For example, the template may bind a different property, or the binding may be missing. The child's own logic is not the cause, because it correctly displays the input it received.