{"id":1267,"date":"2014-07-11T13:21:10","date_gmt":"2014-07-11T07:51:10","guid":{"rendered":"http:\/\/ramkulkarni.com\/blog\/?p=1267"},"modified":"2014-07-11T13:21:10","modified_gmt":"2014-07-11T07:51:10","slug":"angularjs-jquerymobile-and-dynamic-loading-of-pages","status":"publish","type":"post","link":"http:\/\/ramkulkarni.com\/blog\/angularjs-jquerymobile-and-dynamic-loading-of-pages\/","title":{"rendered":"AngularJS +  JQueryMobile and Dynamic Loading of pages"},"content":{"rendered":"<p>I was\u00a0experimenting with using AngularJS and JQueryMobile together and\u00a0loading pages dynamically.\u00a0The page loading and routing can either be handled by JQueryMobile ($.mobile.pageContainer.pagecontainer<span class=\"s1\">(<\/span><span class=\"s2\">&#8220;change&#8221;<\/span>,<span class=\"s2\">&#8220;page_name&#8221;<\/span><span class=\"s1\">)<\/span>) or AngularJS. With AngularJS you can use <a href=\"https:\/\/docs.angularjs.org\/api\/ngRoute\/service\/$route\">$route<\/a>\u00a0service along with <a href=\"https:\/\/docs.angularjs.org\/api\/ngRoute\/directive\/ngView\">ngView<\/a>\u00a0and\/or use\u00a0<a href=\"https:\/\/docs.angularjs.org\/api\/ng\/directive\/ngInclude\">ngInclude<\/a>\u00a0.<\/p>\n<p>ngInclude looked easy enough to start with, but did not turn out to be that easy. I will take as simple example of a login application. If user is not logged-in, the app\u00a0will display the login\u00a0page and after successfully logging in, the application will display the main page, with the option to logout.<!--more--><\/p>\n<p>Here is index.html &#8211;<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #bc7a00;\">&lt;!DOCTYPE html&gt;<\/span>\n\n<span style=\"color: #008000; font-weight: bold;\">&lt;html<\/span> <span style=\"color: #7d9029;\">ng-app=<\/span><span style=\"color: #ba2121;\">\"loginSampleApp\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;head&gt;<\/span>\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;META<\/span> <span style=\"color: #7d9029;\">HTTP-EQUIV=<\/span><span style=\"color: #ba2121;\">\"CACHE-CONTROL\"<\/span> <span style=\"color: #7d9029;\">CONTENT=<\/span><span style=\"color: #ba2121;\">\"NO-CACHE\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;link<\/span> <span style=\"color: #7d9029;\">rel=<\/span><span style=\"color: #ba2121;\">\"stylesheet\"<\/span> <span style=\"color: #7d9029;\">href=<\/span><span style=\"color: #ba2121;\">\"css\/jquery.mobile-1.4.2.min.css\"<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;&lt;\/link&gt;<\/span>\n\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;script <\/span><span style=\"color: #7d9029;\">src=<\/span><span style=\"color: #ba2121;\">\"js\/jquery-2.1.0.min.js\"<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;&lt;\/script&gt;<\/span>\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;script <\/span><span style=\"color: #7d9029;\">src=<\/span><span style=\"color: #ba2121;\">\"js\/jquery.mobile-1.4.2.min.js\"<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;&lt;\/script&gt;<\/span>\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;script <\/span><span style=\"color: #7d9029;\">src=<\/span><span style=\"color: #ba2121;\">\"js\/angular.min.js\"<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;&lt;\/script&gt;<\/span>\n\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;script <\/span><span style=\"color: #7d9029;\">src=<\/span><span style=\"color: #ba2121;\">\"angular_app.js\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;&lt;\/script&gt;<\/span>\n\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/head&gt;<\/span>\n\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;body<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">ng-controller=<\/span><span style=\"color: #ba2121;\">\"mainController\"<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"page\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"header\"<\/span> <span style=\"color: #7d9029;\">data-position=<\/span><span style=\"color: #ba2121;\">\"fixed\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;h2&gt;<\/span>Login Application<span style=\"color: #008000; font-weight: bold;\">&lt;\/h2&gt;<\/span>\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"content\"<\/span> <span style=\"color: #7d9029;\">id=<\/span><span style=\"color: #ba2121;\">\"mainDiv\"<\/span> <span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;ng<\/span><span style=\"color: #7d9029;\">-include<\/span> <span style=\"color: #7d9029;\">src=<\/span><span style=\"color: #ba2121;\">\"getTemplate()\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span><span style=\"border: 1px solid #FF0000;\">&lt;<\/span>\/ng-include&gt;\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"footer\"<\/span> <span style=\"color: #7d9029;\">data-position=<\/span><span style=\"color: #ba2121;\">\"fixed\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;h3&gt;<\/span>Created with AngularJS and JQuery Mobile<span style=\"color: #008000; font-weight: bold;\">&lt;\/h3&gt;<\/span>\n\t\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n\t\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;\/body&gt;<\/span>\n<span style=\"color: #008000; font-weight: bold;\">&lt;\/html&gt;<\/span>\n<\/pre>\n<\/div>\n<p>Body of the page has a JQueryMobile div-page with header, content and footer. The content div calls ng-include directive and source is returned by getTemplate() function, which is declared in angular_app.js.<\/p>\n<p>angular_app.js &#8211;<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008000;\">window<\/span>.loggedIn <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">false<\/span>;\n<span style=\"color: #008000; font-weight: bold;\">var<\/span> loginSampleApp <span style=\"color: #666666;\">=<\/span> angular.module(<span style=\"color: #ba2121;\">\"loginSampleApp\"<\/span>,[]).\ncontroller (\n\t<span style=\"color: #ba2121;\">\"mainController\"<\/span>,\n\t[\n\t\t<span style=\"color: #ba2121;\">\"$scope\"<\/span>,\n\t\t<span style=\"color: #008000; font-weight: bold;\">function<\/span> ($scope)\n\t\t{\n\t\t\t$scope.getTemplate <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">function<\/span>()\n\t\t\t{\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">if<\/span> (<span style=\"color: #666666;\">!<\/span><span style=\"color: #008000;\">window<\/span>.loggedIn )\n\t\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> <span style=\"color: #ba2121;\">\"login.html\"<\/span>;\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">else<\/span>\n\t\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> <span style=\"color: #ba2121;\">\"main.html\"<\/span>;\n\t\t\t}\n\t\t}\n\t]\n). controller(\n\t<span style=\"color: #ba2121;\">\"loginController\"<\/span>,\n\t[\n\t\t<span style=\"color: #ba2121;\">\"$scope\"<\/span>,\n\t\t<span style=\"color: #008000; font-weight: bold;\">function<\/span> ($scope)\n\t\t{\n\t\t\t$scope.userName <span style=\"color: #666666;\">=<\/span> <span style=\"color: #ba2121;\">\"\"<\/span>;\n\t\t\t$scope.password <span style=\"color: #666666;\">=<\/span> <span style=\"color: #ba2121;\">\"\"<\/span>;\n\n\t\t\t$scope.onSubmit <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">function<\/span>()\n\t\t\t{\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">if<\/span> ($scope.userName <span style=\"color: #666666;\">!==<\/span> <span style=\"color: #ba2121;\">\"admin\"<\/span> <span style=\"color: #666666;\">||<\/span> $scope.password <span style=\"color: #666666;\">!==<\/span> <span style=\"color: #ba2121;\">\"admin\"<\/span>)\n\t\t\t\t{\n\t\t\t\t\talert(<span style=\"color: #ba2121;\">\"Invalid user name or password\"<\/span>);\n\t\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> ;\n\t\t\t\t}\n\t\t\t\t<span style=\"color: #008000;\">window<\/span>.loggedIn  <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">true<\/span>;\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> ;\n\t\t\t}\n\n\t\t\t$scope.onReset <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">function<\/span>()\n\t\t\t{\n\t\t\t\t$scope.userName <span style=\"color: #666666;\">=<\/span> <span style=\"color: #ba2121;\">\"\"<\/span>;\n\t\t\t\t$scope.password <span style=\"color: #666666;\">=<\/span> <span style=\"color: #ba2121;\">\"\"<\/span>;\n\t\t\t}\n\t\t}\n\t]\n). controller (\n\t<span style=\"color: #ba2121;\">\"mainPageController\"<\/span>,\n\t[\n\t\t<span style=\"color: #ba2121;\">\"$scope\"<\/span>,\n\t\t<span style=\"color: #008000; font-weight: bold;\">function<\/span> ($scope)\n\t\t{\n\n\t\t\t$scope.logout <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">function<\/span>()\n\t\t\t{\n\t\t\t\t<span style=\"color: #008000;\">window<\/span>.loggedIn  <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">false<\/span>;\n\t\t\t}\n\t\t}\n\t]\n)\n;\n<\/pre>\n<\/div>\n<p>First I\u00a0initialize window.loggedIn flag to false. Then declare Angular App and controllers &#8211; mainController (used in index.html), loginController (used in login.html) and mainPageController (used in main.html). getTemplate function is declared in the mainController and it returns appropriate page name depending on value of the flag window.loggedIn.<\/p>\n<p>login.html &#8211;<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">ng-controller=<\/span><span style=\"color: #ba2121;\">\"loginController\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\tUser Name : <span style=\"color: #008000; font-weight: bold;\">&lt;input<\/span> <span style=\"color: #7d9029;\">type=<\/span><span style=\"color: #ba2121;\">\"text\"<\/span> <span style=\"color: #7d9029;\">id=<\/span><span style=\"color: #ba2121;\">\"userName\"<\/span> <span style=\"color: #7d9029;\">ng-model=<\/span><span style=\"color: #ba2121;\">\"userName\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;&lt;br&gt;<\/span>\n\tPassword  : <span style=\"color: #008000; font-weight: bold;\">&lt;input<\/span> <span style=\"color: #7d9029;\">type=<\/span><span style=\"color: #ba2121;\">\"password\"<\/span> <span style=\"color: #7d9029;\">id=<\/span><span style=\"color: #ba2121;\">\"password\"<\/span> <span style=\"color: #7d9029;\">ng-model=<\/span><span style=\"color: #ba2121;\">\"password\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;&lt;br&gt;<\/span>\n\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;a<\/span> <span style=\"color: #7d9029;\">href=<\/span><span style=\"color: #ba2121;\">\"#\"<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"button\"<\/span> <span style=\"color: #7d9029;\">data-inline=<\/span><span style=\"color: #ba2121;\">\"true\"<\/span> <span style=\"color: #7d9029;\">id=<\/span><span style=\"color: #ba2121;\">\"submitBtn\"<\/span> <span style=\"color: #7d9029;\">ng-click=<\/span><span style=\"color: #ba2121;\">\"onSubmit()\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>Submit<span style=\"color: #008000; font-weight: bold;\">&lt;\/a&gt;<\/span>\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;a<\/span> <span style=\"color: #7d9029;\">href=<\/span><span style=\"color: #ba2121;\">\"#\"<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"button\"<\/span> <span style=\"color: #7d9029;\">data-inline=<\/span><span style=\"color: #ba2121;\">\"true\"<\/span> <span style=\"color: #7d9029;\">id=<\/span><span style=\"color: #ba2121;\">\"resetBtn\"<\/span> <span style=\"color: #7d9029;\">ng-click=<\/span><span style=\"color: #ba2121;\">\"onReset()\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>Reset<span style=\"color: #008000; font-weight: bold;\">&lt;\/a&gt;<\/span>\n<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n<\/pre>\n<\/div>\n<p>And main.html &#8211; <!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008000; font-weight: bold;\">&lt;div<\/span> <span style=\"color: #7d9029;\">ng-controller=<\/span><span style=\"color: #ba2121;\">\"mainPageController\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>\n\tYou are logged-in <span style=\"color: #008000; font-weight: bold;\">&lt;br&gt;<\/span>\n\t<span style=\"color: #008000; font-weight: bold;\">&lt;a<\/span> <span style=\"color: #7d9029;\">href=<\/span><span style=\"color: #ba2121;\">\"#\"<\/span> <span style=\"color: #7d9029;\">data-role=<\/span><span style=\"color: #ba2121;\">\"button\"<\/span> <span style=\"color: #7d9029;\">data-inline=<\/span><span style=\"color: #ba2121;\">\"true\"<\/span> <span style=\"color: #7d9029;\">ng-click=<\/span><span style=\"color: #ba2121;\">\"logout()\"<\/span><span style=\"color: #008000; font-weight: bold;\">&gt;<\/span>Logout<span style=\"color: #008000; font-weight: bold;\">&lt;\/a&gt;<\/span>\n<span style=\"color: #008000; font-weight: bold;\">&lt;\/div&gt;<\/span>\n<\/pre>\n<\/div>\n<p>You can see how this application works <a href=\"http:\/\/ramkulkarni.com\/temp\/2014-07-11\/Example1\/\" target=\"_blank\">here<\/a>\u00a0&#8211; enter user name and password as admin.<br \/>\nThe problem is that JQueryMobile styles are not applied to the dynamically included files. You will see that buttons appear as links instead of JQM buttons and text fields are also not JQM text fields.<\/p>\n<p>The solution for this problem is to trigger JQuery Mobile create event on the parent div, in this example\u00a0it is mainDiv in index.html. So I need to call\u00a0<span class=\"s1\">$<\/span><span class=\"s2\">(<\/span>&#8220;#mainDiv&#8221;<span class=\"s2\">)<\/span><span class=\"s1\">.trigger<\/span><span class=\"s2\">(<\/span>&#8220;create&#8221;<span class=\"s2\">)<\/span><span class=\"s1\">;<\/span><\/p>\n<p>But when and where do I call it from? It has to be called after ng-include is done with loading and compiling the page. So I need to handle $includeContentLoaded, which is triggered when ng-include is done loading the content.\u00a0This event has to be handled on the\u00a0AngularJS scope belonging to ng-include directive &#8211; in this example it is the scope in mainController because ng-include is within mainDiv and mainController is associated with mainDiv. So I modified mainController as follows &#8211; <!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">controller (\n\t<span style=\"color: #ba2121;\">\"mainController\"<\/span>,\n\t[\n\t\t<span style=\"color: #ba2121;\">\"$scope\"<\/span>,\n\t\t<span style=\"color: #008000; font-weight: bold;\">function<\/span> ($scope)\n\t\t{\n\t\t\t$scope.$on(<span style=\"color: #ba2121;\">\"$includeContentLoaded\"<\/span>, <span style=\"color: #008000; font-weight: bold;\">function<\/span>(){\n\t\t\t\t$(<span style=\"color: #ba2121;\">\"#mainDiv\"<\/span>).trigger(<span style=\"color: #ba2121;\">\"create\"<\/span>);\n\t\t\t});\n\n\t\t\t$scope.getTemplate <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000; font-weight: bold;\">function<\/span>()\n\t\t\t{\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">if<\/span> (<span style=\"color: #666666;\">!<\/span><span style=\"color: #008000;\">window<\/span>.loggedIn )\n\t\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> <span style=\"color: #ba2121;\">\"login.html\"<\/span>;\n\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">else<\/span>\n\t\t\t\t\t<span style=\"color: #008000; font-weight: bold;\">return<\/span> <span style=\"color: #ba2121;\">\"main.html\"<\/span>;\n\t\t\t}\n\t\t}\n\t]\n)\n<\/pre>\n<\/div>\n<p>Notice\u00a0$scope.$on(&#8220;$includeContentLoaded&#8221; &#8230;),\u00a0<span class=\"s1\">$<\/span><span class=\"s2\">(<\/span>&#8220;#mainDiv&#8221;<span class=\"s2\">)<\/span><span class=\"s1\">.trigger<\/span><span class=\"s2\">(<\/span>&#8220;create&#8221;<span class=\"s2\">) is called in this event handler. You can see updated application <a href=\"http:\/\/ramkulkarni.com\/temp\/2014-07-11\/Example2\/\" target=\"_blank\">here<\/a> &#8211; notice that buttons and text fields appear properly now.<\/span><\/p>\n<p>So important thing to remember is that you need to apply JQueryMobile styles to dynamic pages not loaded using JQueryMobile by triggering create event. And if you are loading such pages using ngInclude then call trigger function of JQueryMobile in the handler for\u00a0$includeContentLoaded event.<\/p>\n<p>-Ram Kulkarni<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was\u00a0experimenting with using AngularJS and JQueryMobile together and\u00a0loading pages dynamically.\u00a0The page loading and routing can either be handled by JQueryMobile ($.mobile.pageContainer.pagecontainer(&#8220;change&#8221;,&#8220;page_name&#8221;)) or AngularJS. With AngularJS you can use $route\u00a0service along with ngView\u00a0and\/or use\u00a0ngInclude\u00a0. ngInclude looked easy enough to start with, but did not turn out to be that easy. I will take as simple &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/ramkulkarni.com\/blog\/angularjs-jquerymobile-and-dynamic-loading-of-pages\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;AngularJS +  JQueryMobile and Dynamic Loading of pages&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[106,10,30,1],"tags":[107,108,31],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2g9O8-kr","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/1267"}],"collection":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/comments?post=1267"}],"version-history":[{"count":0,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/posts\/1267\/revisions"}],"wp:attachment":[{"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/media?parent=1267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/categories?post=1267"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ramkulkarni.com\/blog\/wp-json\/wp\/v2\/tags?post=1267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}