angular/packages/core/test/render3
Kristiyan Kostadinov 8f3d0b9d97 feat(core): introduce @Service decorator
These changes introduce the new `@Service` decorator which is a more ergonomic alternative to `@Injectable`. The reason we're adding a new decorator is that `@Injectable` has been around since the beginning of Angular and it has a lot of baggage that adds unnecessary overhead for users that generally want to define a singleton service, available in their entire app. The key differences between `@Service` and `@Injectable` are:
1. `@Service` is `providedIn: 'root'` by default. You can opt into providing the service yourself by setting `autoProvided: false` on it.
2. `@Service` doesn't allow constructor-based injection, only the `inject` function.
3. `@Service` doesn't support the complex type signature of `@Injectable` (`useClass`, `useValue` etc.). Instead it supports a single `factory` function.

Example:

```ts
import {Service} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {AuthService} from './auth';

@Service()
export class PostService {
  private readonly httpClient = inject(HttpClient);
  private readonly authService = inject(AuthService);

  getUserPosts() {
    return this.httpClient.get('/api/posts/' + this.authService.userId);
  }
}
```
2026-04-22 11:01:01 -07:00
..
i18n fix(core): block creation of sensitive URI attributes from ICU messages 2026-02-24 10:50:37 -08:00
instructions refactor(core): track the tracing service in the LView environment 2026-03-06 09:48:23 -08:00
interfaces refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
ivy build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
jit feat(core): Set default Component changeDetection strategy to OnPush 2026-03-24 16:25:02 -07:00
styling_next refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
util refactor(core): add walkLViewDirectives 2026-04-14 18:35:51 +03:00
BUILD.bazel build: consolidate domino bundling in platform-server 2026-03-25 13:31:05 -07:00
change_detection_spec.ts fix(core): Flush animations when no component has been checked (#58089) 2025-04-09 11:12:54 -07:00
deps_tracker_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
di_spec.ts refactor(core): track the tracing service in the LView environment 2026-03-06 09:48:23 -08:00
es2015-tsconfig.json fix(core): destroy hooks not set up for useClass provider using forwardRef (#44281) 2021-11-30 11:56:05 -05:00
global_utils_spec.ts refactor(core): abstract control flow discovery utilities (#66167) 2026-03-16 14:17:25 -07:00
i18n_debug_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
imported_renderer2.ts refactor(platform-browser): remove unused Platform ID dependency from DomRendererFactory2 2025-11-06 12:00:46 -08:00
instructions_spec.ts build: update Jasmine to 6.0.0 2026-02-09 12:15:57 -08:00
integration_spec.ts fix(core): prevent binding unsafe attributes on SVG animation elements (#67797) 2026-04-01 11:43:58 +02:00
is_shape_of.ts refactor(forms): move control logic into FormField directive 2026-01-29 13:17:40 -08:00
is_shape_of_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
jit_environment_spec.ts feat(core): introduce @Service decorator 2026-04-22 11:01:01 -07:00
list_reconciliation_spec.ts fix(core): ensure @for iteration over field is reactive (#64113) 2025-10-24 09:29:29 +02:00
load_domino.ts build: migrate all ts_library in packages/core/test (#61472) 2025-05-20 10:00:43 +00:00
matchers.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
matchers_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
metadata_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
multi_map_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
node_selector_matcher_spec.ts refactor(core): simplify attributes extraction logic for ComponentRef (#59678) 2025-01-27 13:15:21 +01:00
providers_helper.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
providers_spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
query_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00
reactive_safety_spec.ts refactor(core): remove ComponentFactoryResolver & ComponentFactory from the api surface"" 2026-04-07 09:30:25 -07:00
reactivity_spec.ts feat(core): Set default Component changeDetection strategy to OnPush 2026-03-24 16:25:02 -07:00
testing_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
utils.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
view_fixture.ts refactor(core): track the tracing service in the LView environment 2026-03-06 09:48:23 -08:00
view_utils_spec.ts refactor(core): convert scripts within packages/core/test to relative imports (#60227) 2025-03-25 10:58:00 -07:00