You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pre><codeclass="language-bash">ng add @angular/material</code></pre><p>The <code>ng add</code> command will install Angular Material, the <ahref="https://material.angular.dev/cdk/categories">Component Dev Kit (CDK)</a>, and will ask you the following questions to determine which features to include:</p>
12
12
<ol>
13
13
<li><p>Choose a prebuilt theme name, or "custom" for a custom theme:</p>
14
-
<p>You can choose from <ahref="https://material.angular.dev/guide/theming#pre-built-themes">prebuilt material design themes</a> or set up an extensible <ahref="https://material.angular.dev/guide/theming#defining-a-theme">custom theme</a>.</p>
14
+
<p>You can choose from <ahref="https://material.angular.dev/guide/theming#prebuilt-themes">prebuilt material design themes</a> or set up an extensible <ahref="https://material.angular.dev/guide/theming#getting-started">custom theme</a>.</p>
15
15
</li>
16
16
<li><p>Set up global Angular Material typography styles:</p>
17
17
<p>Whether to apply the global <ahref="https://material.angular.dev/guide/typography">typography</a> styles to your application.</p>
<spanclass="hljs-keyword">class</span><spanclass="hljs-title class_">AppComponent</span> {}</code></pre><p>Add the <code><mat-slide-toggle></code> tag to the <code>app.component.html</code> like so:</p>
49
46
<pre><codeclass="language-html"><spanclass="hljs-tag"><<spanclass="hljs-name">mat-slide-toggle</span>></span>Toggle me!<spanclass="hljs-tag"></<spanclass="hljs-name">mat-slide-toggle</span>></span></code></pre><p>Run your local dev server:</p>
<spanclass="hljs-punctuation">]</span></code></pre><p>You can <ahref="https://github.com/angular/components/blob/main/src/material/core/theming/prebuilt">reference the source code for these prebuilt themes</a> to see
dialogRef.<spanclass="hljs-title function_">close</span>(<spanclass="hljs-string">'Pizza!'</span>);</code></pre><p>Components created via <code>Dialog</code> can <em>inject</em><code>DialogRef</code> and use it to close the dialog
32
32
in which they are contained. When closing, an optional result value can be provided. This result
33
33
value is forwarded as the result of the <code>closed</code> Observable.</p>
data = inject<{<spanclass="hljs-attr">name</span>:<spanclass="hljs-built_in">string</span>}>(<spanclass="hljs-variable constant_">DIALOG_DATA</span>);
128
130
}</code></pre><p>If you're using a <code>TemplateRef</code> for your dialog content, the data is available in the template:</p>
0 commit comments