Sitelet https://github.com/angular/angular/commit/1663b5e7837ee86bfd774cf78e1ee62dc8211457
Skip to content

Commit 1663b5e

Browse files
erkamyamanNothingEverHappens
authored andcommitted
docs(platform-browser): link the styling guide from the namespacing APIs (#70835)
Point the TSDoc of `provideCssVarNamespacing` and `CssVarNamespacer` at the guide section that describes them, so the generated API pages lead back to it, and name the component file in the guide's example. PR Close #70835
1 parent dbce551 commit 1663b5e

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎adev/src/content/guide/components/styling.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Prefer a style binding such as `[style.--primary-color]`, which Angular namespac
235235
you go through a DOM API instead, pass the name you wrote in your styles to
236236
[`CssVarNamespacer`](api/platform-browser/CssVarNamespacer), including the leading `--`:
237237

238-
```angular-ts
238+
```angular-ts {header: "profile-photo.ts"}
239239
import {Component, ElementRef, inject} from '@angular/core';
240240
import {CssVarNamespacer} from '@angular/platform-browser';
241241

‎packages/platform-browser/src/dom/css_var_namespacer.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {CSS_VAR_NAMESPACE} from './dom_renderer';
1414
* This is useful when reading or setting CSS variables dynamically in JavaScript that
1515
* were transformed by the compiler during the build.
1616
*
17+
* @see [Using namespaced properties in TypeScript](guide/components/styling#using-namespaced-properties-in-typescript)
1718
* @publicApi 22.1
1819
*/
1920
@Service()

‎packages/platform-browser/src/dom/dom_renderer.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export const CSS_VAR_NAMESPACE = new InjectionToken<string>(
8888
*
8989
* @param namespace The prefix string to use as a namespace. If not provided, it defaults
9090
* to the `APP_ID`. An underscore is appended unconditionally.
91+
* @see [Namespacing CSS custom properties](guide/components/styling#namespacing-css-custom-properties)
9192
* @publicApi
9293
*/
9394
export function provideCssVarNamespacing(namespace?: string): EnvironmentProviders {

0 commit comments

Comments
 (0)