From ee535777bb2a48003a84260f5f524dbf22760eb1 Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Wed, 17 Jan 2018 13:44:05 -0500 Subject: [PATCH] docs: add ngStyle to cheat sheet (#22070) PR Close #22070 --- aio/content/guide/cheatsheet.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aio/content/guide/cheatsheet.md b/aio/content/guide/cheatsheet.md index cf758b4f20..7bdce13171 100644 --- a/aio/content/guide/cheatsheet.md +++ b/aio/content/guide/cheatsheet.md @@ -140,6 +140,11 @@ is available to declarations of this module.

Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand expression should return {class-name: true/false} map.

+ +<div [ngStyle]="{'property': 'value'}">
<div [ngStyle]="dynamicStyles()"> +

Allows you to assign styles to an HTML element using CSS. You can use CSS directly, as in the first example, or you can call a method from the component.

+ +