{"id":592,"date":"2018-06-26T08:53:19","date_gmt":"2018-06-25T20:53:19","guid":{"rendered":"https:\/\/content.ronella.xyz\/apps\/wordpress\/?p=592"},"modified":"2018-06-26T08:57:21","modified_gmt":"2018-06-25T20:57:21","slug":"angular-data-bindings","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=592","title":{"rendered":"Angular Data Bindings"},"content":{"rendered":"<p>Binding coordinates state transfer between the component's class and its template. The following table shows the different types of Angular data bindings.<\/p>\n\n<table id=\"tablepress-6\" class=\"tablepress tablepress-id-6\">\n<thead>\n<tr class=\"row-1 odd\">\n\t<th class=\"column-1\">Type<\/th><th class=\"column-2\">Description<\/th><th class=\"column-3\">Direction<\/th><th class=\"column-4\">Example<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-hover\">\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\">Interpolation<\/td><td class=\"column-2\">Evaluates the expression between the double curly braces.<\/td><td class=\"column-3\">One-way <br \/>\n<br \/>\n(Component&rarr;Template)<\/td><td class=\"column-4\">&lt;h1&gt;<strong>{{<\/strong>header<strong>}}<\/strong>&lt;\/h1&gt;<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\">Property Binding<\/td><td class=\"column-2\">Updates the property if there's a change from the bound component state. <br \/>\n<br \/>\nThis is typically denoted by the square bracket surrounding the target property.<\/td><td class=\"column-3\">One-way<br \/>\n<br \/>\n(Component&rarr;Template)<\/td><td class=\"column-4\">&lt;img <strong>[<\/strong>src<strong>]<\/strong>='imageURL'\/&gt;<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\">Event Binding<\/td><td class=\"column-2\">Updates the bound component state if an event's was fired. <br \/>\n<br \/>\nThis is typically denoted by the parenthesis surrounding the event property.<\/td><td class=\"column-3\">One-way<br \/>\n<br \/>\n(Component&larr;Template)<\/td><td class=\"column-4\">&lt;button <strong>(<\/strong>click<strong>)<\/strong>='onSave'&gt;Save&lt;\/button&gt;<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n\t<td class=\"column-1\">Two-Way Binding<\/td><td class=\"column-2\">Normally use with the form elements. <br \/>\n<br \/>\nThis is typically denoted by the combined square and parenthesis surrounding the ngModel property.<\/td><td class=\"column-3\">Two-way<br \/>\n<br \/>\n(Component&harr;Template)<\/td><td class=\"column-4\">&lt;input type='text' <strong>[(<\/strong>ngModel<strong>)]<\/strong>='name'\/&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-6 from cache -->\n","protected":false},"excerpt":{"rendered":"<p>Binding coordinates state transfer between the component&#8217;s class and its template. The following table shows the different types of Angular data bindings.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[40,38],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/592"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=592"}],"version-history":[{"count":5,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/592\/revisions"}],"predecessor-version":[{"id":606,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/592\/revisions\/606"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}