5 lines
7.9 KiB
JSON
5 lines
7.9 KiB
JSON
{
|
|
"id": "api/common/NgStyle",
|
|
"title": "NgStyle",
|
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/common\", \"name\": \"@angular/common\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/common/NgStyle\", \"name\": \"NgStyle\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/common\">@angular/common</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_style.ts?message=docs(common)%3A%20describe%20your%20change...#L9-L88\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_style.ts#L9-L88\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"ngstyle\">NgStyle<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#ngstyle\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label directive\">directive</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>An attribute directive that updates styles for the containing HTML element.\nSets one or more style properties, specified as colon-separated key-value pairs.\nThe key is a style name, with an optional <code>.<unit></code> suffix\n(such as 'top.px', 'font-style.em').\nThe value is an expression to be evaluated.\nThe resulting non-null value, expressed in the given unit,\nis assigned to the given style property.\nIf the result of evaluation is null, the corresponding style is removed.</p>\n\n \n </section>\n \n \n \n \n\n <h2 id=\"ngmodule\">NgModule<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#ngmodule\"><i class=\"material-icons\">link</i></a></h2>\n<ul class=\"ngmodule-list\">\n\n <li>\n <a href=\"api/common/CommonModule\">\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">CommonModule</code-example>\n </a>\n </li>\n \n</ul>\n\n\n \n<section class=\"selector-list\">\n <h2 id=\"selectors\">Selectors<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#selectors\"><i class=\"material-icons\">link</i></a></h2>\n \n <ul>\n <li><code>[<a href=\"api/common/NgStyle\" class=\"code-anchor\">ngStyle</a>]</code></li>\n \n </ul>\n \n</section>\n\n\n\n \n\n<section class=\"instance-properties\">\n <h2 id=\"properties\">Properties<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#properties\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th>Property</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"ngStyle\"></a>\n <code class=\"\"><span class=\"property-binding\">@<a href=\"api/core/Input\" class=\"code-anchor\">Input</a>()</span><br><span class=\"member-name\"><a href=\"api/common/NgStyle\" class=\"code-anchor\">ngStyle</a></span>: { [klass: string]: any; }</code>\n </td>\n <td><span class=\"write-only-property\">Write-Only</span>\n \n \n \n </td>\n </tr>\n \n </tbody>\n </table>\n</section>\n\n\n\n \n\n\n \n <section class=\"description\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#description\"><i class=\"material-icons\">link</i></a></h2>\n \n <p>Set the font of the containing element to the result of an expression.</p>\n<code-example>\n<some-element [<a href=\"api/common/NgStyle\" class=\"code-anchor\">ngStyle</a>]=\"{'font-style': styleExp}\">...</some-element>\n</code-example>\n<p>Set the width of the containing element to a pixel value returned by an expression.</p>\n<code-example>\n<some-element [<a href=\"api/common/NgStyle\" class=\"code-anchor\">ngStyle</a>]=\"{'max-width.px': widthExp}\">...</some-element>\n</code-example>\n<p>Set a collection of style values using an expression that returns key-value pairs.</p>\n<code-example>\n<some-element [<a href=\"api/common/NgStyle\" class=\"code-anchor\">ngStyle</a>]=\"objExp\">...</some-element>\n</code-example>\n\n </section>\n \n\n \n\n \n\n \n\n<section class=\"instance-methods\">\n <h2 id=\"methods\">Methods<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"ngDoCheck\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"ngdocheck\">\n ngDoCheck()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgStyle#ngdocheck\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_style.ts?message=docs(common)%3A%20describe%20your%20change...#L62-L70\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_style.ts#L62-L70\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n \n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">ngDoCheck</span>()</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n</section>\n\n \n \n \n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common\n - api/common/CommonModule\n - api/core/DoCheck\n - guide/ajs-quick-reference\n - guide/attribute-binding\n - guide/built-in-directives\n - guide/cheatsheet\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/CommonModule\n - api/common/NgStyle#description\n - api/common/NgStyle#methods\n - api/common/NgStyle#ngdocheck\n - api/common/NgStyle#ngmodule\n - api/common/NgStyle#ngstyle\n - api/common/NgStyle#properties\n - api/common/NgStyle#selectors\n - api/core/Input\n - https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_style.ts?message=docs(common)%3A%20describe%20your%20change...#L62-L70\n - https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_style.ts?message=docs(common)%3A%20describe%20your%20change...#L9-L88\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_style.ts#L62-L70\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_style.ts#L9-L88\n-->"
|
|
} |