{"id":1234,"date":"2023-09-20T18:22:38","date_gmt":"2023-09-20T16:22:38","guid":{"rendered":"https:\/\/epicmarketing.co.il\/notebook\/?p=1234"},"modified":"2023-09-20T18:23:33","modified_gmt":"2023-09-20T16:23:33","slug":"ngstyle","status":"publish","type":"post","link":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/","title":{"rendered":"ngStyle"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">ngStyle \u05d4\u05d5\u05d0 Attribute directive. \u05de\u05d4 \u05e9\u05d0\u05d5\u05de\u05e8 \u05e9\u05d4\u05d5\u05d0 \u05de\u05e9\u05e0\u05d4 \u05d0\u05ea \u05d4\u05de\u05e8\u05d0\u05d4 \u05d0\u05d5 \u05d4\u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05d0\u05dc\u05de\u05e0\u05d8 html. \u05d4\u05d5\u05d0 \u05dc\u05d0 \u05de\u05d5\u05e1\u05d9\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8\u05d9\u05dd \u05dc-DOM.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1-ngStyle \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5 \u05dc\u05d4\u05e1\u05d9\u05e8 class \u05e9\u05dc css \u05d3\u05d9\u05e0\u05de\u05d9\u05ea \u05de\u05d0\u05dc\u05de\u05e0\u05d8 html \u05e2\u05dc \u05e4\u05d9 \u05e2\u05e8\u05da \u05e9\u05dc \u05de\u05e9\u05ea\u05e0\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><p style=\"box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 \/ 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; margin-bottom: var(--ifm-leading); color: rgb(28, 30, 33); font-family: system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, Ubuntu, Cantarell, &quot;Noto Sans&quot;, sans-serif, BlinkMacSystemFont, &quot;Segoe UI&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 16px; letter-spacing: normal; white-space-collapse: collapse;\"><\/p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05dc-ngStyle<a href=\"https:\/\/angular-notebook.netlify.app\/docs\/directives\/directives%20ngstyle#%D7%A9%D7%99%D7%9E%D7%95%D7%A9%D7%99%D7%9D-%D7%9C-ngstyle\">\u200b<\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05d1-ngStyle:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u05e2\u05d9\u05e6\u05d5\u05d1 \u05de\u05e1\u05d5\u05d9\u05d9\u05dd \u05db\u05d0\u05e9\u05e8 \u05d4\u05de\u05e9\u05ea\u05de\u05e9 \u05d1\u05d5\u05d7\u05e8 \u05e2\u05e8\u05db\u05d9\u05dd \u05d1\u05e8\u05e9\u05d9\u05de\u05d4.<\/li>\n\n\n\n<li>\u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05de\u05d6\u05d4\u05d4 \u05d0\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8 \u05d4\u05e4\u05e2\u05d9\u05dc \u05d1\u05ea\u05e4\u05e8\u05d9\u05d8.<\/li>\n\n\n\n<li>\u05e2\u05d9\u05e6\u05d5\u05d1 \u05e9\u05de\u05d6\u05d4\u05d4 \u05ea\u05db\u05d5\u05e0\u05d4 \u05e9\u05dc \u05de\u05d5\u05e6\u05e8 \u05dc\u05de\u05e9\u05dc \u05de\u05d5\u05e6\u05e8 \u05d7\u05d3\u05e9 \u05d0\u05d5 \u05d1\u05de\u05d1\u05e6\u05e2.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05dd ngStyle<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05e8\u05e9\u05d9\u05de\u05d4 \u05e9\u05dc \u05de\u05d5\u05e6\u05e8\u05d9\u05dd \u05d5\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05e6\u05d9\u05d9\u05df \u05d0\u05ea \u05d4\u05ea\u05d5\u05d5\u05d9\u05ea &quot;\u05d1\u05de\u05dc\u05d0\u05d9&quot; \u05d1\u05d9\u05e8\u05d5\u05e7 \u05d5\u05d0\u05ea \u05d4\u05ea\u05d5\u05d5\u05d9\u05ea &quot;\u05dc\u05d0 \u05d1\u05de\u05dc\u05d0\u05d9&quot; \u05d1\u05d0\u05d3\u05d5\u05dd.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>products.component.html<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;table&gt;\n    &lt;tr&gt;\n        &lt;th&gt;Name&lt;\/th&gt;\n        &lt;th&gt;Price&lt;\/th&gt;\n        &lt;th&gt;In Stock&lt;\/th&gt;\n    &lt;\/tr&gt;\n\n    &lt;tr *ngFor=&quot;let product of products&quot;&gt;\n        &lt;td&gt;{{ product.name }}&lt;\/td&gt;\n        &lt;td&gt;{{ product.price }}&lt;\/td&gt;\n        &lt;td &#x5B;ngStyle]=&quot;{ color: product.instock === true ? &#039;green&#039; : &#039;red&#039; }&quot;&gt;\n            {{ product.instock }}&lt;\/td&gt;\n    &lt;\/tr&gt;\n&lt;\/table&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05d7\u05d1\u05e8 \u05d0\u05ea ngStyle \u05dc\u05de\u05e9\u05ea\u05e0\u05d4 \u05d5\u05dc\u05db\u05df \u05d9\u05e9 \u05de\u05e1\u05d1\u05d9\u05d1\u05d5 [].<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d1\u05d3\u05d5\u05d2\u05de\u05d0 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05e6\u05d1\u05e2 \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8 \u05dc\u05e4\u05d9 \u05d4\u05d6\u05de\u05d9\u05e0\u05d5\u05ea \u05e9\u05dc \u05d4\u05de\u05d5\u05e6\u05e8. \u05e0\u05d1\u05d3\u05d5\u05e7 \u05d4\u05d0\u05dd instock \u05d4\u05d5\u05d0 true \u05d5\u05e0\u05d9\u05ea\u05df \u05dc\u05d8\u05e7\u05e1\u05d8 \u05e6\u05d1\u05e2 \u05d9\u05e8\u05d5\u05e7, \u05d0\u05d7\u05e8\u05ea \u05d4\u05d5\u05d0 \u05d9\u05d4\u05d9\u05d4 \u05d0\u05d3\u05d5\u05dd.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ngStyle \u05e2\u05dd \u05ea\u05e0\u05d0\u05d9\u05dd \u05de\u05e8\u05d5\u05d1\u05d9\u05dd<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05d9 \u05d4\u05e8\u05d1\u05d4 \u05ea\u05e0\u05d0\u05d9\u05dd \u05dc\u05e4\u05d9\u05d4\u05dd \u05d0\u05e0\u05d9 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05d4\u05e2\u05d9\u05e6\u05d5\u05d1, \u05d0\u05d9\u05da \u05d0\u05e4\u05e9\u05e8 \u05dc\u05e2\u05e9\u05d5\u05ea \u05d0\u05ea \u05d6\u05d4?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05e0\u05d2\u05d3\u05d9\u05e8 \u05d0\u05ea \u05d4\u05ea\u05e0\u05d0\u05d9\u05dd \u05e9\u05dc\u05e0\u05d5 \u05d1\u05ea\u05d5\u05da \u05e7\u05d5\u05d1\u05e5 \u05d4-ts. \u05d1\u05d3\u05d5\u05d2\u05de\u05d0 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05dc\u05e9\u05e0\u05d5\u05ea \u05d0\u05ea \u05e6\u05d1\u05e2 \u05d4\u05e9\u05de\u05d5\u05ea \u05e9\u05dc \u05d4\u05d0\u05e0\u05e9\u05d9\u05dd \u05e2\u05dc \u05e4\u05d9 \u05d4\u05de\u05d3\u05d9\u05e0\u05d4 \u05de\u05de\u05e0\u05d4 \u05d4\u05d2\u05d9\u05e2\u05d5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ngetColor(country) {\n    switch (country) {\n        case &#039;UK&#039;:\n        return &#039;green&#039;;\n        case &#039;USA&#039;:\n        return &#039;blue&#039;;\n        case &#039;HK&#039;:\n        return &#039;red&#039;;\n    }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e7\u05d1\u05dc\u05d9\u05dd \u05d0\u05ea \u05d4\u05e2\u05e8\u05da \u05d4\u05e8\u05e6\u05d5\u05d9 \u05e9\u05dc \u05d4\u05e6\u05d1\u05e2 \u05dc\u05e4\u05d9 \u05d4\u05e2\u05e8\u05da \u05e9\u05dc \u05d4\u05de\u05d3\u05d9\u05e0\u05d4 \u05d1\u05d0\u05d5\u05d1\u05d9\u05d9\u05e7\u05d8.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>component.html<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;ul *ngFor=&quot;let person of people&quot;&gt;\n  &lt;li &#x5B;ngStyle]=&quot;{&#039;color&#039;:getColor(person.country)}&quot;&gt; \n        {{ person.name }} - {{ person.country }}&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e4\u05e9\u05e8 \u05dc\u05e4\u05e0\u05d5\u05ea \u05dc\u05e2\u05e8\u05da \u05e9\u05dc color \u05e2\u05dd syntax \u05e9\u05d5\u05e0\u05d4, \u05d4\u05e4\u05e2\u05d5\u05dc\u05d4 \u05ea\u05d4\u05d9\u05d4 \u05d6\u05d4\u05d4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>component.html<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;ul *ngFor=&quot;let person of people&quot;&gt;\n  &lt;li &#x5B;style.color]=&quot;getColor(person.country)&quot;&gt;{{ person.name }} - {{ person.country }}&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u05de\u05e2\u05e8\u05da \u05e9\u05dc \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1-ngStyle \u05db\u05d3\u05d9 \u05dc\u05e7\u05d1\u05dc \u05de\u05e2\u05e8\u05da \u05e9\u05dc \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nprim-btn = true;\nbtn-important = true;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>component.html<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;p&gt;Passing a configuration object:&lt;\/p&gt;\n&lt;button &#x5B;ngClass]=&quot;{ &#039;btn&#039;: btn-important, &#039;btn-primary&#039;: prim-btn }&quot;&gt;\n    Button\n&lt;\/button&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u05e9\u05d9\u05de\u05d5\u05e9 \u05d1\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d4 \u05dc\u05d4\u05d2\u05d3\u05e8\u05ea ngClass<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u05dc\u05e4\u05e2\u05de\u05d9\u05dd \u05d4\u05ea\u05e0\u05d0\u05d9\u05dd \u05e9\u05dc ngClass \u05d4\u05d5\u05e4\u05db\u05d9\u05dd \u05e2\u05de\u05d5\u05e1\u05d9\u05dd \u05d5\u05de\u05e7\u05e9\u05d9\u05dd \u05e2\u05dc \u05d4\u05e7\u05e8\u05d9\u05d0\u05d5\u05ea \u05e9\u05dc \u05d4\u05e7\u05d5\u05d3.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u05d1\u05de\u05e7\u05e8\u05d4 \u05db\u05d6\u05d4 \u05d0\u05e0\u05d7\u05e0\u05d5 \u05d9\u05db\u05d5\u05dc\u05d9\u05dd \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d4 \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05e9\u05dc\u05d5\u05d7 \u05d0\u05ea \u05d4\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>component.html<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;button (click)=&quot;toggleState()&quot;&gt;Toggle State&lt;\/button&gt;\n\n&lt;p&gt;Obtaining the CSS classes from the component method:&lt;\/p&gt;\n&lt;button &#x5B;ngClass]=&quot;calculateClasses()&quot; (click)=&quot;submit()&quot;&gt;Button&lt;\/button&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>component.ts<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nexport class AppComponent {\n\n    stateFlag = false;\n\n    toggleState() {\n        this.stateFlag = !this.stateFlag;\n    }\n\n    submit() {\n        console.log(&#039;Button submitted&#039;);\n    }\n\n    calculateClasses() {\n        return {\n            btn: true,\n            &#039;btn-primary&#039;: true,\n            &#039;btn-extra-class&#039;: this.stateFlag\n        };\n    }\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u05de\u05d4 \u05e7\u05d5\u05e8\u05d4 \u05d1\u05e7\u05d5\u05d3?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>stateFlag \u05de\u05d6\u05d4\u05d4 \u05d0\u05dd \u05d4\u05de\u05e6\u05d1 \u05e9\u05dc \u05d4\u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d4 \u05d4\u05d5\u05d0 \u05e4\u05e2\u05d9\u05dc \u05d0\u05d5 \u05dc\u05d0.<\/li>\n\n\n\n<li>\u05d4\u05e4\u05d5\u05e0\u05e7\u05e6\u05d9\u05d4 calculateClasses \u05e0\u05d5\u05ea\u05e0\u05ea \u05dc\u05e0\u05d5 \u05d0\u05ea \u05d4\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea \u05e9\u05dc \u05d4-css \u05e9\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd \u05d5\u05de\u05ea\u05d9\u05d9\u05d7\u05e1\u05ea \u05dc\u05de\u05e6\u05d1 \u05e9\u05dc \u05d4\u05e7\u05d5\u05de\u05e4\u05d5\u05e0\u05e0\u05d8\u05d4.<\/li>\n\n\n\n<li>\u05d4\u05ea\u05d5\u05e1\u05e4\u05ea \u05e9\u05dc btn-extra-class \u05d9\u05d4\u05d9\u05d4 \u05d1\u05d4\u05ea\u05d0\u05dd \u05dc\u05de\u05e6\u05d1 \u05e9\u05dc stateFlag.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>ngStyle \u05d4\u05d5\u05d0 Attribute directive. \u05de\u05d4 \u05e9\u05d0\u05d5\u05de\u05e8 \u05e9\u05d4\u05d5\u05d0 \u05de\u05e9\u05e0\u05d4 \u05d0\u05ea \u05d4\u05de\u05e8\u05d0\u05d4 \u05d0\u05d5 \u05d4\u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05d0\u05dc\u05de\u05e0\u05d8 html. \u05d4\u05d5\u05d0 \u05dc\u05d0 \u05de\u05d5\u05e1\u05d9\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8\u05d9\u05dd \u05dc-DOM. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1-ngStyle \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5 \u05dc\u05d4\u05e1\u05d9\u05e8 class \u05e9\u05dc css \u05d3\u05d9\u05e0\u05de\u05d9\u05ea \u05de\u05d0\u05dc\u05de\u05e0\u05d8 html \u05e2\u05dc \u05e4\u05d9 \u05e2\u05e8\u05da \u05e9\u05dc \u05de\u05e9\u05ea\u05e0\u05d4. \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05dc-ngStyle\u200b \u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05d1-ngStyle: \u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05dd ngStyle \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05e8\u05e9\u05d9\u05de\u05d4 \u05e9\u05dc \u05de\u05d5\u05e6\u05e8\u05d9\u05dd \u05d5\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[29,35],"tags":[],"class_list":["post-1234","post","type-post","status-publish","format-standard","hentry","category-angular-docs","category-ngdocs-directives","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ngStyle - Code Notebook<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/\" \/>\n<meta property=\"og:locale\" content=\"he_IL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ngStyle - Code Notebook\" \/>\n<meta property=\"og:description\" content=\"ngStyle \u05d4\u05d5\u05d0 Attribute directive. \u05de\u05d4 \u05e9\u05d0\u05d5\u05de\u05e8 \u05e9\u05d4\u05d5\u05d0 \u05de\u05e9\u05e0\u05d4 \u05d0\u05ea \u05d4\u05de\u05e8\u05d0\u05d4 \u05d0\u05d5 \u05d4\u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05d0\u05dc\u05de\u05e0\u05d8 html. \u05d4\u05d5\u05d0 \u05dc\u05d0 \u05de\u05d5\u05e1\u05d9\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8\u05d9\u05dd \u05dc-DOM. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1-ngStyle \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5 \u05dc\u05d4\u05e1\u05d9\u05e8 class \u05e9\u05dc css \u05d3\u05d9\u05e0\u05de\u05d9\u05ea \u05de\u05d0\u05dc\u05de\u05e0\u05d8 html \u05e2\u05dc \u05e4\u05d9 \u05e2\u05e8\u05da \u05e9\u05dc \u05de\u05e9\u05ea\u05e0\u05d4. \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05dc-ngStyle\u200b \u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05d1-ngStyle: \u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05dd ngStyle \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05e8\u05e9\u05d9\u05de\u05d4 \u05e9\u05dc \u05de\u05d5\u05e6\u05e8\u05d9\u05dd \u05d5\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Notebook\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-20T16:22:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T16:23:33+00:00\" \/>\n<meta name=\"author\" content=\"kerendanino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3\" \/>\n\t<meta name=\"twitter:data1\" content=\"kerendanino\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u05d3\u05e7\u05d5\u05ea\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/\"},\"author\":{\"name\":\"kerendanino\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\"},\"headline\":\"ngStyle\",\"datePublished\":\"2023-09-20T16:22:38+00:00\",\"dateModified\":\"2023-09-20T16:23:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/\"},\"wordCount\":45,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"articleSection\":[\"Angular Documentation\",\"Directives\"],\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/\",\"name\":\"ngStyle - Code Notebook\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\"},\"datePublished\":\"2023-09-20T16:22:38+00:00\",\"dateModified\":\"2023-09-20T16:23:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/#breadcrumb\"},\"inLanguage\":\"he-IL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/ngstyle\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ngStyle\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#website\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"name\":\"Code Notebook\",\"description\":\"Easy coding\",\"publisher\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"he-IL\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#organization\",\"name\":\"Code Notebook\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"contentUrl\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo-epic-marketing-05.png\",\"width\":3626,\"height\":1942,\"caption\":\"Code Notebook\"},\"image\":{\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/#\\\/schema\\\/person\\\/195dfc625818eadda7903d456890e24c\",\"name\":\"kerendanino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"he-IL\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g\",\"caption\":\"kerendanino\"},\"url\":\"https:\\\/\\\/epicmarketing.co.il\\\/notebook\\\/author\\\/kerendanino\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ngStyle - Code Notebook","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/","og_locale":"he_IL","og_type":"article","og_title":"ngStyle - Code Notebook","og_description":"ngStyle \u05d4\u05d5\u05d0 Attribute directive. \u05de\u05d4 \u05e9\u05d0\u05d5\u05de\u05e8 \u05e9\u05d4\u05d5\u05d0 \u05de\u05e9\u05e0\u05d4 \u05d0\u05ea \u05d4\u05de\u05e8\u05d0\u05d4 \u05d0\u05d5 \u05d4\u05d4\u05ea\u05e0\u05d4\u05d2\u05d5\u05ea \u05e9\u05dc \u05d0\u05dc\u05de\u05e0\u05d8 html. \u05d4\u05d5\u05d0 \u05dc\u05d0 \u05de\u05d5\u05e1\u05d9\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8\u05d9\u05dd \u05dc-DOM. \u05d0\u05e0\u05d7\u05e0\u05d5 \u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1-ngStyle \u05e2\u05dc \u05de\u05e0\u05ea \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5 \u05dc\u05d4\u05e1\u05d9\u05e8 class \u05e9\u05dc css \u05d3\u05d9\u05e0\u05de\u05d9\u05ea \u05de\u05d0\u05dc\u05de\u05e0\u05d8 html \u05e2\u05dc \u05e4\u05d9 \u05e2\u05e8\u05da \u05e9\u05dc \u05de\u05e9\u05ea\u05e0\u05d4. \u05e9\u05d9\u05de\u05d5\u05e9\u05d9\u05dd \u05dc-ngStyle\u200b \u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea \u05dc\u05e6\u05d5\u05e8\u05da \u05d1-ngStyle: \u05d3\u05d5\u05d2\u05de\u05d0 \u05e2\u05dd ngStyle \u05e0\u05e0\u05d9\u05d7 \u05e9\u05d9\u05e9 \u05dc\u05e0\u05d5 \u05e8\u05e9\u05d9\u05de\u05d4 \u05e9\u05dc \u05de\u05d5\u05e6\u05e8\u05d9\u05dd \u05d5\u05d0\u05e0\u05d7\u05e0\u05d5 \u05e8\u05d5\u05e6\u05d9\u05dd [&hellip;]","og_url":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/","og_site_name":"Code Notebook","article_published_time":"2023-09-20T16:22:38+00:00","article_modified_time":"2023-09-20T16:23:33+00:00","author":"kerendanino","twitter_card":"summary_large_image","twitter_misc":{"\u05e0\u05db\u05ea\u05d1 \u05e2\u05dc \u05d9\u05d3":"kerendanino","\u05d6\u05de\u05df \u05e7\u05e8\u05d9\u05d0\u05d4 \u05de\u05d5\u05e2\u05e8\u05da":"2 \u05d3\u05e7\u05d5\u05ea"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/#article","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/"},"author":{"name":"kerendanino","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c"},"headline":"ngStyle","datePublished":"2023-09-20T16:22:38+00:00","dateModified":"2023-09-20T16:23:33+00:00","mainEntityOfPage":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/"},"wordCount":45,"commentCount":0,"publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"articleSection":["Angular Documentation","Directives"],"inLanguage":"he-IL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/","url":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/","name":"ngStyle - Code Notebook","isPartOf":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#website"},"datePublished":"2023-09-20T16:22:38+00:00","dateModified":"2023-09-20T16:23:33+00:00","breadcrumb":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/#breadcrumb"},"inLanguage":"he-IL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/epicmarketing.co.il\/notebook\/ngstyle\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/epicmarketing.co.il\/notebook\/"},{"@type":"ListItem","position":2,"name":"ngStyle"}]},{"@type":"WebSite","@id":"https:\/\/epicmarketing.co.il\/notebook\/#website","url":"https:\/\/epicmarketing.co.il\/notebook\/","name":"Code Notebook","description":"Easy coding","publisher":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/epicmarketing.co.il\/notebook\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"he-IL"},{"@type":"Organization","@id":"https:\/\/epicmarketing.co.il\/notebook\/#organization","name":"Code Notebook","url":"https:\/\/epicmarketing.co.il\/notebook\/","logo":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/","url":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","contentUrl":"https:\/\/epicmarketing.co.il\/notebook\/wp-content\/uploads\/2023\/07\/logo-epic-marketing-05.png","width":3626,"height":1942,"caption":"Code Notebook"},"image":{"@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/epicmarketing.co.il\/notebook\/#\/schema\/person\/195dfc625818eadda7903d456890e24c","name":"kerendanino","image":{"@type":"ImageObject","inLanguage":"he-IL","@id":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/285cc9389c66aa46da1e26a474b1e90e9efaf3fa21f1b928cbd63ce5f0e89c63?s=96&d=mm&r=g","caption":"kerendanino"},"url":"https:\/\/epicmarketing.co.il\/notebook\/author\/kerendanino\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/comments?post=1234"}],"version-history":[{"count":2,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1234\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/posts\/1234\/revisions\/1236"}],"wp:attachment":[{"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/media?parent=1234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/categories?post=1234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/epicmarketing.co.il\/notebook\/wp-json\/wp\/v2\/tags?post=1234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}