{"id":29905,"date":"2015-11-17T12:02:13","date_gmt":"2015-11-17T06:32:13","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=29905"},"modified":"2017-08-03T13:18:20","modified_gmt":"2017-08-03T07:48:20","slug":"using-bindtocontroller-with-controlleras-syntax-in-angular","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/","title":{"rendered":"Using bindToController with ControllerAs syntax in Angular"},"content":{"rendered":"<p>In <a title=\"angularjs development company\" href=\"https:\/\/tothenewco.pro\/front-end-angularjs-development\">an Angular application<\/a>, when we use a controller as syntax we generally encounter isolated scope binding issues, controller&#8217;s scope is bound to &#8216;this&#8217; reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every scope property is bound to our directive.<\/p>\n<p><code> var testApp=angular.module(\"testControllerAs\")<\/code><\/p>\n<p><code>testApp.controller(\"TechnologyController\", [\"$scope\", function ($scope) {<br \/>\nthis.name = \"Tech Department\"<br \/>\nthis.employees = 1<br \/>\n}])<br \/>\n<\/code><br \/>\n<code>testApp.directive('testDirectiveWithScope', function () {<br \/>\nreturn {<br \/>\nrestrict: 'E',<br \/>\nscope: {employees: \"=\"},<br \/>\ncontroller: 'TechnologyController',<br \/>\ncontrollerAs: 'ctrl',<br \/>\ntemplate: '&lt;input type=\"text\" \/&gt;\u00a0{{ctrl.name}} {{ctrl.employees}}',<br \/>\n};<br \/>\n})<br \/>\n<\/code><br \/>\n<code><br \/>\n&lt;div ng-controller=\"TechnologyController as tech\"&gt;<br \/>\n{{tech.employees}} \/\/Output :1<br \/>\n&lt;test-directive-with-scope employees=\"tech.employees\"&gt;&lt;\/test-directive-with-scope&gt;<br \/>\n&lt;\/div&gt;<\/code><\/p>\n<p>In above example, employees do not bind with scope of controller. When we change no. of employees then no. of employees do not change inside every &#8220;<b>TechnologyController<\/b>&#8220;. Scope is not working with controllerAs. To bind employees with scope we should add a watcher which watch employees input box when input box updates then its value also update in controller.<\/p>\n<p>Like this:<\/p>\n<p><code>testApp.controller(\"TechnologyController\", [\"$scope\", function ($scope) {<br \/>\nthis.name = \"Tech Department\"<br \/>\nthis.employees = 1<br \/>\n$scope.$watch('employees', function (newValue) {<br \/>\nthis.employees = newValue;<br \/>\n}.bind(this));<br \/>\n}])<\/code><\/p>\n<p><strong>Watcher will update employee value according to input box. But we need $scope for this, which is not correct.<\/strong><\/p>\n<div style=\"text-decoration: underline;\"><b>Solution bindToController :<\/b><\/div>\n<p>Angular introduces a new property to the directive definition object called bindToController. BindToController enables the inherited properties to be bound to the Controller without $scope object. When controller is instantiated, the initial values of the isolated scope bindings are available on this &amp; future changes are automatically available.<\/p>\n<p><code>&lt;div ng-controller=\"TechnologyController as tech\"&gt;<br \/>\nEmployess: {{tech.employees}}<br \/>\n&lt;input type=\"text\" ng-model=\"tech.employees\"&gt;<br \/>\n&lt;test-directive-with-scope employees=\"tech.employees\"&gt;&lt;\/test-directive-with-scope&gt;<br \/>\n&lt;\/div&gt;<br \/>\n<\/code><\/p>\n<p><code>testApp.controller(\"TechnologyController\", [\"$scope\", function ($scope) {<br \/>\nthis.name = \"Tech Department\"<br \/>\nthis.employees = 1<br \/>\n}])<\/code><\/p>\n<p>In Angular 1.3,when we set bindToController property to true with isolated scope that uses controllerAs, then it binds all the properties of controller.<\/p>\n<p><code>testApp.directive('testDirectiveWithScope', function () {<br \/>\nreturn {<br \/>\nrestrict: 'E',<br \/>\nscope: { employees: \"=\"},<br \/>\nbindToController:true,<br \/>\ncontroller: 'TechnologyController',<br \/>\ncontrollerAs: 'ctrl',<br \/>\ntemplate: '<br \/>\nTemplate :{{ctrl.name}} {{ctrl.employees}}'<br \/>\n};<br \/>\n})<\/code><\/p>\n<p>Improvement in Angular 1.4, We can move all the property binding definition to bindToController &amp; make it an object.<\/p>\n<p><code>testApp.directive('testDirectiveWithScope', function () {<br \/>\nreturn {<br \/>\nrestrict: 'E',<br \/>\nscope: {},<br \/>\nbindToController: {<br \/>\nemployees: \"=\"<br \/>\n},<br \/>\ncontroller: 'TechnologyController',<br \/>\ncontrollerAs: 'ctrl',<br \/>\ntemplate: '<br \/>\nTemplate :{{ctrl.name}} {{ctrl.employees}}'<br \/>\n};<br \/>\n})<br \/>\n<\/code><\/p>\n<p><a href=\"https:\/\/tothenewco.pro\/blog\/building-intuitive-frontend-interfaces-with-angularjs\/\">Building Intuitive Frontend Interfaces with AngularJS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller&#8217;s scope is bound to &#8216;this&#8217; reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every [&hellip;]<\/p>\n","protected":false},"author":76,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":24,"footnotes":""},"categories":[1439,3429,1],"tags":[3955,4697],"class_list":["post-29905","post","type-post","status-publish","format-standard","hentry","category-angular","category-front-end-development","category-technology","tag-angular-development","tag-angularjs-development-company"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller&#039;s scope is bound to &#039;this&#039; reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Heena Dhamija\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/\" \/>\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=\"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller&#039;s scope is bound to &#039;this&#039; reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/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=\"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller&#039;s scope is bound to &#039;this&#039; reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/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\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#article\",\"name\":\"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog\",\"headline\":\"Using bindToController with ControllerAs syntax in Angular\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/heena\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2015-11-17T12:02:13+05:30\",\"dateModified\":\"2017-08-03T13:18:20+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#webpage\"},\"articleSection\":\"AngularJS, Front End Development, Technology, angular development, AngularJS Development Company\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#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\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#listItem\",\"name\":\"Using bindToController with ControllerAs syntax in Angular\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#listItem\",\"position\":3,\"name\":\"Using bindToController with ControllerAs syntax in Angular\",\"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\\\/heena\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/heena\\\/\",\"name\":\"Heena Dhamija\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0769bddbfb0a2a86d747d40444a48cc704b36582a4a73d0d8e6a3084d128edea?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Heena Dhamija\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/\",\"name\":\"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog\",\"description\":\"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller's scope is bound to 'this' reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/using-bindtocontroller-with-controlleras-syntax-in-angular\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/heena\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/heena\\\/#author\"},\"datePublished\":\"2015-11-17T12:02:13+05:30\",\"dateModified\":\"2017-08-03T13:18:20+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":"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog","description":"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller's scope is bound to 'this' reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every","canonical_url":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#article","name":"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog","headline":"Using bindToController with ControllerAs syntax in Angular","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/heena\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2015-11-17T12:02:13+05:30","dateModified":"2017-08-03T13:18:20+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#webpage"},"articleSection":"AngularJS, Front End Development, Technology, angular development, AngularJS Development Company"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#listItem","name":"Using bindToController with ControllerAs syntax in Angular"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#listItem","position":3,"name":"Using bindToController with ControllerAs syntax in Angular","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/heena\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/heena\/","name":"Heena Dhamija","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0769bddbfb0a2a86d747d40444a48cc704b36582a4a73d0d8e6a3084d128edea?s=96&d=mm&r=g","width":96,"height":96,"caption":"Heena Dhamija"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/","name":"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog","description":"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller's scope is bound to 'this' reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/heena\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/heena\/#author"},"datePublished":"2015-11-17T12:02:13+05:30","dateModified":"2017-08-03T13:18:20+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog","og:description":"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller's scope is bound to 'this' reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every","og:url":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Using bindToController with ControllerAs syntax in Angular | TO THE NEW Blog","twitter:description":"In an Angular application, when we use a controller as syntax we generally encounter isolated scope binding issues, controller's scope is bound to 'this' reference. But how does it work while building directive with an isolated scope? We can create an isolated scope by adding an object to our directive definition that explains how every","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"29905","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","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":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","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-29 11:56:54","updated":"2024-02-29 08:16:21","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:\/\/tothenewco.pro\/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:\/\/tothenewco.pro\/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\tUsing bindToController with ControllerAs syntax in Angular\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"Using bindToController with ControllerAs syntax in Angular","link":"https:\/\/tothenewco.pro\/blog\/using-bindtocontroller-with-controlleras-syntax-in-angular\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/29905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=29905"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/29905\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=29905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=29905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=29905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}