{"id":15036,"date":"2014-07-28T11:15:42","date_gmt":"2014-07-28T05:45:42","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=15036"},"modified":"2014-07-28T11:15:42","modified_gmt":"2014-07-28T05:45:42","slug":"explicitly-providing-ng-model-to-dom-elements","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/","title":{"rendered":"Explicitly providing ng-model to DOM elements"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2014\/12\/angularjs.jpg\" alt=\"angularjs\" width=\"600\" height=\"300\" class=\"aligncenter size-full wp-image-14740\" srcset=\"https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2014\/12\/angularjs.jpg 600w, https:\/\/www.tothenew.com\/blog\/wp-content\/uploads\/2014\/12\/angularjs-300x150.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>In AngularJS, we can easily write our own custom directives to achieve required functionality. There are certain attributes which we provide in directive definition like <code>restrict<\/code> , <code>scope<\/code> , <code>template<\/code>, <code>link<\/code>, <code>transclude<\/code> etc.<\/p>\n<p>There is one more attribute named : <code>require<\/code> , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality:<\/p>\n<ul>\n<li><strong>1. Without prefix<\/strong> &#8211; Locate the required controller on the current element. Throw an error if not found.<\/li>\n<li><strong>2. (?)<\/strong> &#8211; Attempt to locate the required controller or pass null to the link function if not found.<\/li>\n<li><strong>3. (^)<\/strong> &#8211; Locate the required controller by searching the element&#8217;s parents. Throw an error if not found.<\/li>\n<li><strong>4. (?^)<\/strong> &#8211; Attempt to locate the required controller by searching the element&#8217;s parents or pass null to the link function if not found.<\/li>\n<\/ul>\n<p><\/p>\n<p>Lets understand it with an example. We have a <code>&lt;div&gt;<\/code> and we want to assign ng-model to it which is not provided in angular by default. So, we write a custom directive for it and implement the required task inside it.<br \/>\n[js]<br \/>\nangular.module(&#8216;demoApp&#8217;, []).directive(&#8216;contenteditable&#8217;, function() {<br \/>\n    return {<br \/>\n      restrict: &#8216;A&#8217;,<br \/>\n      require: &#8216;?ngModel&#8217;,<br \/>\n      link: function(scope, element, attrs, ngModelCntrl) {<br \/>\n        if(!ngModel) return;<\/p>\n<p>        ngModel.$render = function() {<br \/>\n          element.html(ngModel.$viewValue || &#8221;);<br \/>\n        };<\/p>\n<p>        element.bind(&#8216;keyup&#8217;, function() {<br \/>\n          scope.$apply(write);<br \/>\n        });<br \/>\n        write();<\/p>\n<p>        function write() {<br \/>\n          ngModel.$setViewValue(element.html());<br \/>\n        }<br \/>\n      }<br \/>\n    };<br \/>\n});<br \/>\n[\/js]<br \/>\nThe html file will use this directive like:<br \/>\n[js]<br \/>\n&lt;div id=&quot;contentBox&quot; style=&#8217;height: 55px&#8217;&gt;<\/p>\n<p>&lt;\/div&gt;<br \/>\n[\/js]<\/p>\n<p>Here, we provide <code>ngModel<\/code> in require attribute and therefore we get <code>ngModelCntrl<\/code> as fourth augument which is an instance of the required <code>NgModelController<\/code>( built-in controller to handle setting our model value).<\/p>\n<p>There are various functions related to NgModelController like <code>$viewValue()<\/code>, <code>$modelValue()<\/code>, <code>$setViewValue()<\/code> etc, which help us to play with it.<\/p>\n<p>So, in this way we can explicitly provide ng-model to those DOM elements for which angular donot implicitly provide ng-model like all input elements.<\/p>\n<p>Hope it helps \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Directives there is one more attribute named : &#8220;require&#8221; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.<\/p>\n","protected":false},"author":65,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":6,"footnotes":""},"categories":[1],"tags":[955,1155,55,1492,1493],"class_list":["post-15036","post","type-post","status-publish","format-standard","hentry","category-technology","tag-angularjs","tag-directives","tag-javascript","tag-ngmodel","tag-require"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In Directives there is one more attribute named : &quot;require&quot; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sakshi Tyagi\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Explicitly providing ng-model to DOM elements | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In Directives there is one more attribute named : &quot;require&quot; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Explicitly providing ng-model to DOM elements | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In Directives there is one more attribute named : &quot;require&quot; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#article\",\"name\":\"Explicitly providing ng-model to DOM elements | TO THE NEW Blog\",\"headline\":\"Explicitly providing ng-model to DOM elements\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sakshi\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2014\\\/12\\\/angularjs.jpg\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#articleImage\"},\"datePublished\":\"2014-07-28T11:15:42+05:30\",\"dateModified\":\"2014-07-28T11:15:42+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#webpage\"},\"articleSection\":\"Technology, AngularJS, directives, javascript, ngModel, require\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#listItem\",\"name\":\"Explicitly providing ng-model to DOM elements\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#listItem\",\"position\":3,\"name\":\"Explicitly providing ng-model to DOM elements\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sakshi\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sakshi\\\/\",\"name\":\"Sakshi Tyagi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a42c6deb088e18815dfcfed629c77b032d17bf973881421880b9c5e4ba713739?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Sakshi Tyagi\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/\",\"name\":\"Explicitly providing ng-model to DOM elements | TO THE NEW Blog\",\"description\":\"In Directives there is one more attribute named : \\\"require\\\" , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/explicitly-providing-ng-model-to-dom-elements\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sakshi\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sakshi\\\/#author\"},\"datePublished\":\"2014-07-28T11:15:42+05:30\",\"dateModified\":\"2014-07-28T11:15:42+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Explicitly providing ng-model to DOM elements | TO THE NEW Blog","description":"In Directives there is one more attribute named : \"require\" , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.","canonical_url":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#article","name":"Explicitly providing ng-model to DOM elements | TO THE NEW Blog","headline":"Explicitly providing ng-model to DOM elements","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sakshi\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2014\/12\/angularjs.jpg","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#articleImage"},"datePublished":"2014-07-28T11:15:42+05:30","dateModified":"2014-07-28T11:15:42+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#webpage"},"articleSection":"Technology, AngularJS, directives, javascript, ngModel, require"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#listItem","name":"Explicitly providing ng-model to DOM elements"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#listItem","position":3,"name":"Explicitly providing ng-model to DOM elements","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/sakshi\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/sakshi\/","name":"Sakshi Tyagi","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a42c6deb088e18815dfcfed629c77b032d17bf973881421880b9c5e4ba713739?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sakshi Tyagi"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/","name":"Explicitly providing ng-model to DOM elements | TO THE NEW Blog","description":"In Directives there is one more attribute named : \"require\" , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sakshi\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/sakshi\/#author"},"datePublished":"2014-07-28T11:15:42+05:30","dateModified":"2014-07-28T11:15:42+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Explicitly providing ng-model to DOM elements | TO THE NEW Blog","og:description":"In Directives there is one more attribute named : &quot;require&quot; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.","og:url":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Explicitly providing ng-model to DOM elements | TO THE NEW Blog","twitter:description":"In Directives there is one more attribute named : &quot;require&quot; , which gives us the liberty to include another directive and inject its controller as the fourth argument to the linking function. It accept both string as well as array type. In case of array, the controllers are included in the given order. There are some prefixes, when applied before controller name, provides different functionality.","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"15036","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 04:17:13","updated":"2024-02-29 09:38:12","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tExplicitly providing ng-model to DOM elements\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Explicitly providing ng-model to DOM elements","link":"https:\/\/www.tothenew.com\/blog\/explicitly-providing-ng-model-to-dom-elements\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/15036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=15036"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/15036\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=15036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=15036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=15036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}