What is @angular/language-service?
The @angular/language-service package provides a way to get completions, errors, hints, and navigation inside Angular templates. It works with both external and inline templates and is used primarily in integrated development environments (IDEs) and text editors to enhance the development experience with Angular applications.
What are @angular/language-service's main functionalities?
Autocompletion
Provides autocompletion suggestions for Angular template syntax, including bindings, directives, components, and template variables.
No specific code sample can be provided as this functionality is integrated into IDEs and leverages the language service API to provide autocompletion suggestions.
Error Checking
Highlights errors in Angular templates, such as type errors, missing directives, and incorrect bindings, helping developers to identify and fix issues more quickly.
No specific code sample can be provided as this functionality is integrated into IDEs and leverages the language service API to highlight errors in Angular templates.
Navigation and Refactoring
Enables features like 'Go to definition' for components, directives, and template variables, and supports refactoring operations such as renaming symbols.
No specific code sample can be provided as this functionality is integrated into IDEs and leverages the language service API to enable features like go to definition and refactoring.
Other packages similar to @angular/language-service
typescript
While not specifically for Angular, TypeScript is often used alongside Angular for type checking and editor integrations. TypeScript provides language services that offer similar features (like autocompletion and error checking) but for TypeScript code rather than Angular templates.
vetur
Vetur is a Vue tooling for VSCode, offering features similar to @angular/language-service but for Vue.js applications. It provides syntax highlighting, snippets, Emmet, linting/error checking, formatting, auto completion, debugging, and more for Vue components.
eslint-plugin-angular
This package is an ESLint plugin that contains a set of rules for static code analysis of Angular applications. While it doesn't offer real-time error checking or autocompletion within templates, it provides a similar goal of improving code quality and catching errors.
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT
15.1.0 (2023-01-10)
Deprecations
router
-
CanLoad guards in the Router are deprecated. Use CanMatch
instead.
-
router writable properties
The following strategies are meant to be configured by registering the
application strategy in DI via the providers
in the root NgModule
or
bootstrapApplication
:
routeReuseStrategy
titleStrategy
urlHandlingStrategy
The following options are meant to be configured using the options
available in RouterModule.forRoot
or provideRouter
.
onSameUrlNavigation
paramsInheritanceStrategy
urlUpdateStrategy
canceledNavigationResolution
The following options are available in RouterModule.forRoot
but not
available in provideRouter
:
malformedUriErrorHandler
- This was found to not be used anywhere
internally.
errorHandler
- Developers can instead subscribe to Router.events
and filter for NavigationError
.
common
| Commit | Type | Description |
| -- | -- | -- |
| fe50813664 | feat | Add BrowserPlatformLocation to the public API (#48488) |
| 2f4f0638c7 | fix | Add data attribtue to NgOptimizedImage (#48497) |
compiler
| Commit | Type | Description |
| -- | -- | -- |
| a532d71975 | feat | allow self-closing tags on custom elements (#48535) |
| caf7228f8a | fix | resolve deprecation warning (#48652) |
| 33f35b04ef | fix | type-only symbols incorrectly retained when downlevelling custom decorators (#48638) |
compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| caedef0f5b | fix | update @babel/core
dependency and lock version (#48634) |
core
| Commit | Type | Description |
| -- | -- | -- |
| 6acae1477a | feat | Add TestBed.runInInjectionContext
to help test functions which use inject
(#47955) |
| 38421578a2 | feat | Make the isStandalone()
function available in public API (#48114) |
| dd42974b07 | feat | support TypeScript 4.9 (#48005) |
forms
| Commit | Type | Description |
| -- | -- | -- |
| 8aa8b4b77c | fix | Form provider FormsModule.withConfig return a FormsModule (#48526) |
language-service
| Commit | Type | Description |
| -- | -- | -- |
| 5f0b53c735 | feat | Allow auto-imports to suggest multiple possible imports. (#47787) |
| 6a8ea29a04 | fix | expose package.json
for vscode extension resolution (#48678) |
| ce8160ecb2 | fix | Prevent crashes on unemitable references (#47938) |
| e615b598ba | fix | ship /api
entry-point (#48670) |
| 6ce7d76a0e | fix | update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48663) |
localize
| Commit | Type | Description |
| -- | -- | -- |
| a1a8e91eca | fix | add triple slash type reference on @angular/localize
on `ng add (#48502) |
migrations
| Commit | Type | Description |
| -- | -- | -- |
| cc284afbbc | fix | combine newly-added imports in import manager (#48620) |
router
| Commit | Type | Description |
| -- | -- | -- |
| 228e992db7 | docs | Deprecate canLoad guards in favor of canMatch (#48180) |
| 0a8b8a66cd | docs | Deprecate public members of Router that are meant to be configured elsewhere (#48006) |
| 332461bd0c | feat | Add ability to override onSameUrlNavigation
default per-navigation (#48050) |
| f58ad86e51 | feat | Add feature provider for enabling hash navigation (#48301) |
| 73f03ad2d2 | feat | Add new NavigationSkipped event for ignored navigations (#48024) |
| 3fe75710d9 | fix | page refresh should not destroy history state (#48540) |
Special Thanks
Alan Agius, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bob Watson, Charles Lyding, Derek Cormier, Doug Parker, Dylan Hunn, George Kalpakas, Greg Magolan, Jessica Janiuk, JiaLiPassion, Joey Perrott, Kristiyan Kostadinov, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Renan Ferro, Tim Gates, Vadim, Virginia Dooley, ced, mgechev, piyush132000, robertIsaac and sr5434
<!-- CHANGELOG SPLIT MARKER -->
<a name="15.0.4"></a>