Angular @if and @for Patterns and ngIf/ngFor Pitfalls
Modern Angular uses built-in @if and @for; legacy *ngIf and *ngFor remain important for maintenance but are deprecated from Angular 20.
TOPIC
Modern Angular uses built-in @if and @for; legacy *ngIf and *ngFor remain important for maintenance but are deprecated from Angular 20.
Passing the same data (a site name, a list of categories for a navbar) into every single controller method that returns a view doesn't scale — View::share() and view composers exist to avoid exactly that repetition.
A full framework, not a library — the distinction that actually shapes how building an Angular app differs from a lighter tool like React or Vue, beyond just syntax.
Every component in Angular is technically a directive too — understanding the three-way split (component, structural, attribute) clarifies why *ngIf, [ngClass], and a custom component all count as the same underlying concept.
Beyond a basic Route::get(), the features that actually shape a real app's routes are parameters, route model binding, named routes, and grouping shared middleware or prefixes together.
*ngFor only iterates arrays and other iterables natively — looping over a plain object's keys and values needs either the built-in KeyValue pipe or converting the object first.
php artisan make:component, passing data as props, and the difference between a class-backed component and an anonymous view-only one.
A pipe transforms a value for display, right in the template, without touching the underlying data — the built-in set covers formatting basics, and a custom pipe extends the same pattern to anything else.
The three visibility keywords control where a property or method can actually be accessed from — the distinction between protected and private specifically comes down to whether a subclass gets access too.
PHP classes can only extend one parent — traits are the language's answer to needing the same reusable method in several otherwise-unrelated classes without that single-inheritance limit getting in the way.
Composer manages a project's external library dependencies and their versions — every modern PHP framework, Laravel included, is built on top of it, not alongside it.
A component becomes genuinely reusable through its public API — @Input/@Output for data, and content projection (ng-content) for letting the parent supply arbitrary markup, not just values.