{"id":23611,"date":"2019-01-18T12:15:17","date_gmt":"2019-01-18T10:15:17","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=23611"},"modified":"2019-01-18T11:42:17","modified_gmt":"2019-01-18T09:42:17","slug":"angularjs-scope","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/","title":{"rendered":"AngularJS Scope"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. Overview<\/h2>\n\n\n\n<p>In this post, we are reviewing scope in AngularJS. It is passed as an argument when we make a controller:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">&lt;script&gt;\nvar myApp = angular.module('myApp', []);\n\nmyApp.controller('myController', function($scope) {\n    $scope.name = \"Red Dead Redemption\";\n});\n&lt;\/script&gt;<\/pre>\n\n\n\n<p>Scope is actually an <strong>object<\/strong> that refers to the <strong>model<\/strong> in an application structure, such as Model View Controller (MVC) .<\/p>\n\n\n\n<p>It provides definitions \u2013 also known as context \u2013 for JavaScript-like code snippets called <a href=\"https:\/\/docs.angularjs.org\/guide\/expression\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"expressions (opens in a new tab)\">expressions<\/a>. Scopes are structured in a hierarchy that mimics the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document_Object_Model\/Introduction\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Document Object Model (DOM)  (opens in a new tab)\">Document Object Model (DOM) <\/a>structure of the application. Scopes can watch expressions and propagate events in a similar way to DOM events.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Scope is a Data Model<\/h2>\n\n\n\n<p>What does it mean for Scope to be a data model? It is a JavaScript object with properties and methods that can be accessed by both the view and controller:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"561\" height=\"181\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/angularjs-diagram.png\" alt=\"AngularJS Scope\" class=\"wp-image-23613\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/angularjs-diagram.png 561w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/angularjs-diagram-300x97.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/figure><\/div>\n\n\n\n<p>Here, we have an example that demonstrates how modifying the view can affect the controller and model:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n   &lt;script src = \"https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.7.5\/angular.min.js\"&gt;&lt;\/script&gt;\n&lt;body&gt;\n\n&lt;div ng-app=\"demoApp\" ng-controller=\"demoCtrl\"&gt;\n\n&lt;input ng-model=\"word\"&gt;\n\n&lt;h1&gt;Hello, {{word}}!&lt;\/h1&gt;\n\n&lt;\/div&gt;\n\n&lt;script&gt;\nvar app = angular.module('demoApp', []);\napp.controller('demoCtrl', function($scope) {\n    $scope.word = \"word\";\n});\n&lt;\/script&gt;\n\n&lt;p&gt;If we change the word in the input field, the change will affect the model and the word property in the controller.&lt;\/p&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n\n\n\n<p>Feel free to copy and paste that code into your favorite text editor or download the file from my <a href=\"https:\/\/github.com\/michaelcgood\/angularjs-scope-example\/blob\/master\/angularscope-ex1.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Github (opens in a new tab)\">Github<\/a>.<\/p>\n\n\n\n<p>In this simple example, if we modify the input in the web page, we see the value change for the greeting in the <em>&lt;h1&gt;<\/em> tags:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"768\" height=\"273\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-8.17.25-PM.png\" alt=\"AngularJS Scope\" class=\"wp-image-23615\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-8.17.25-PM.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-8.17.25-PM-300x107.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">3. Root Scope &amp; Hierarchies<\/h2>\n\n\n\n<p>Each AngularJS application has only one root scope, but can have any number of child scopes.<\/p>\n\n\n\n<p>An application can have several scopes because&nbsp;directives&nbsp;can create new child scopes. When new scopes are created, they become children of their parent scope. This creates a tree structure which parallels the DOM where they\u2019re attached.<\/p>\n\n\n\n<p>The example below, which is available in my <a href=\"https:\/\/github.com\/michaelcgood\/angularjs-scope-example\/blob\/master\/angularscope-ex2.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Github (opens in a new tab)\">Github<\/a>, shows how multiple scopes work in an application and also prototypal inheritance of properties:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted brush:js\">&lt;script src = \"https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.7.5\/angular.min.js\"&gt;&lt;\/script&gt;\n  &lt;script&gt;\n  (function(angular) {\n  'use strict';\nangular.module('scopeExample', [])\n  .controller('HelloController', ['$scope', '$rootScope', function($scope, $rootScope) {\n    $scope.name = 'World';\n    $rootScope.department = 'Red Dead Redemption 2';\n  }])\n  .controller('ListController', ['$scope', function($scope) {\n    $scope.names = ['Arthur', 'Dutch', 'Bill'];\n  }]);\n})(window.angular);\n\n  &lt;\/script&gt;\n  \n&lt;\/head&gt;\n&lt;body ng-app=\"scopeExample\"&gt;\n  &lt;div class=\"show-scope-demo\"&gt;\n  &lt;div ng-controller=\"HelloController\"&gt;\n    Hello {{name}}!\n  &lt;\/div&gt;\n  &lt;div ng-controller=\"ListController\"&gt;\n    &lt;ol&gt;\n      &lt;li ng-repeat=\"name in names\"&gt;{{name}} from {{department}}&lt;\/li&gt;\n    &lt;\/ol&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n\n\n\n<p>The page will display like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"732\" height=\"336\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-11.23.22-PM.png\" alt=\"AngularJS Scope\" class=\"wp-image-23616\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-11.23.22-PM.png 732w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-17-at-11.23.22-PM-300x138.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/figure><\/div>\n\n\n\n<p>In the code shown above, when <em>[[name]]<\/em> is evaluated by AngularJS, it first looks at the scope associated with the value for the <em>ng-controller <\/em>attribute for the <em>name<\/em>&nbsp;property. This is why it says \u201cHello World!\u201d on top rather than a character name from Red Dead Redemption 2.<\/p>\n\n\n\n<p>If the property is not found, it searches the parent scope and so on until the root scope is reached. The AngularJS documentation calls this prototypical inheritance, while others like <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Inheritance_and_the_prototype_chain\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Mozilla call it prototypal inheritance (opens in a new tab)\">Mozilla call it prototypal inheritance<\/a>.<\/p>\n\n\n\n<p>Regardless of what it\u2019s truly called, what we need to know is JavaScript only has one construct: objects. Every object has a private property that holds a link to another object called its prototype.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Conclusion<\/h2>\n\n\n\n<p>Today we reviewed the core concepts of scope in AngularJS. We reviewed that it is an object that resides in the model of an application; that it is hierarchical and has prototypal inheritance; and, there can only be one root scope.<\/p>\n\n\n\n<p>AngularJS can be used effectively with the <a href=\"http:\/\/michaelcgood.com\/category\/spring\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Spring Framework (opens in a new tab)\">Spring Framework<\/a>. To learn more AngularJS, I will be checking out <a href=\"https:\/\/click.linksynergy.com\/fs-bin\/click?id=vhCP6x1Aa1I&amp;offerid=507388.81&amp;type=3&amp;subid=0\">courses on Udemy<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/treehouse.7eer.net\/c\/1353496\/294479\/3944\">Treehouse<\/a>.<\/p>\n\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Web Code Geeks with permission by Michael Good, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"http:\/\/michaelcgood.com\/angularjs-scope\/\" target=\"_blank\" rel=\"noopener\">AngularJS Scope<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Overview In this post, we are reviewing scope in AngularJS. It is passed as an argument when we make a controller: &lt;script&gt; var myApp = angular.module(&#8216;myApp&#8217;, []); myApp.controller(&#8216;myController&#8217;, function($scope) { $scope.name = &#8220;Red Dead Redemption&#8221;; }); &lt;\/script&gt; Scope is actually an object that refers to the model in an application structure, such as Model &hellip;<\/p>\n","protected":false},"author":11031,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-23611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AngularJS Scope - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AngularJS Scope - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-18T10:15:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Good\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Good\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\"},\"author\":{\"name\":\"Michael Good\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2b657bb1c3626ddf4995145b18afafaa\"},\"headline\":\"AngularJS Scope\",\"datePublished\":\"2019-01-18T10:15:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\"},\"wordCount\":492,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\",\"name\":\"AngularJS Scope - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2019-01-18T10:15:17+00:00\",\"description\":\"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Angular.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"AngularJS Scope\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2b657bb1c3626ddf4995145b18afafaa\",\"name\":\"Michael Good\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g\",\"caption\":\"Michael Good\"},\"description\":\"interested in Java, cyber security, and open source technologies. Follow his personal blog to read more from Michael.\",\"sameAs\":[\"http:\/\/www.michaelcgood.com\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/michael-good\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AngularJS Scope - Web Code Geeks - 2026","description":"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/","og_locale":"en_US","og_type":"article","og_title":"AngularJS Scope - Web Code Geeks - 2026","og_description":"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2019-01-18T10:15:17+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","type":"image\/jpeg"}],"author":"Michael Good","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Michael Good","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/"},"author":{"name":"Michael Good","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2b657bb1c3626ddf4995145b18afafaa"},"headline":"AngularJS Scope","datePublished":"2019-01-18T10:15:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/"},"wordCount":492,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/","name":"AngularJS Scope - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2019-01-18T10:15:17+00:00","description":"Interested to learn about AngularJS Scope? Check our article reviwing scope, which is actually an object that refers to the model, structure in AngularJS","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angularjs-scope\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Angular.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/"},{"@type":"ListItem","position":4,"name":"AngularJS Scope"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2b657bb1c3626ddf4995145b18afafaa","name":"Michael Good","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc6ef7dbff80afe08a3cdc3b0677aaa26021085e041ce1873dc2141bc581b623?s=96&d=mm&r=g","caption":"Michael Good"},"description":"interested in Java, cyber security, and open source technologies. Follow his personal blog to read more from Michael.","sameAs":["http:\/\/www.michaelcgood.com"],"url":"https:\/\/www.webcodegeeks.com\/author\/michael-good\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/23611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/11031"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=23611"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/23611\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/909"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=23611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=23611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=23611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}