{"id":2139,"date":"2015-01-16T17:15:20","date_gmt":"2015-01-16T15:15:20","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=2139"},"modified":"2015-01-12T14:10:11","modified_gmt":"2015-01-12T12:10:11","slug":"using-angularjs-to-extend-your-code-quality","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/","title":{"rendered":"Using AngularJS to Extend Your Code Quality"},"content":{"rendered":"<p>The AngularJS API provides a function named <strong>extend<\/strong> that can help improve your code quality and efficiency. I always look for ways to improve quality, increase efficiency, reduce risk and eliminate ritual and ceremony when I am developing software.<\/p>\n<p>Perhaps the simplest way to express this is the DRY principle (Don\u2019t Repeat Yourself). I prefer a refactoring-driven approach to this principle. Instead of trying to anticipate what <em>might<\/em> be needed in a framework, I simply evolve it and refactor when I see an opportunity to improvement. Oftentimes Angular\u2019s <strong>extend<\/strong> function is a part of that refactoring.<\/p>\n<p>Assume I am writing a page that allows the user to click two buttons to produce a list of categories and products. Here is a screenshot with the categories loaded and the products waiting for the user to request them.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/01\/image_thumb1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2145\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/01\/image_thumb1.png\" alt=\"image_thumb[1]\" width=\"591\" height=\"232\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/01\/image_thumb1.png 591w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/01\/image_thumb1-300x118.png 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/p>\n<p>The source for data is exposed via the example API at <a href=\"http:\/\/odata.org\" target=\"_blank\">OData.org<\/a>. To encapsulate the call for categories, I create a component and register it with Angular that looks like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction CategoriesService($http, $q) {\r\n     this.$http = $http;\r\n     this.$q = $q;\r\n}  \r\n\r\n\r\nCategoriesService.prototype.get = function () {\r\n     var deferral = this.$q.defer();\r\n     this.$http.get('http:\/\/services.odata.org\/V4\/OData\/OData.svc\/')\r\n         .success(function (response) {\r\n             deferral.resolve(response.value);\r\n         })\r\n         .error(function (err) {\r\n             deferral.reject(err);\r\n         });\r\n     return deferral.promise;\r\n};\r\n \r\napp.service('categories', CategoriesService);<\/pre>\n<p>Next, I move on to products. It turns out that the products service looks almost identical to the categories service! I don\u2019t want to repeat myself so it\u2019s time to refactor the code to take advantage of the principle of inheritance. I encapsulate the base functionality for dealing with the service in a base class, then inherit from that and specify what\u2019s unique between products and categories. The base class looks like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nvar baseOData = {\r\n     $http: {},\r\n     $q: {},\r\n     baseUrl: 'http:\/\/services.odata.org\/V4\/OData\/OData.svc\/',\r\n     entity: '',\r\n     get: function () {\r\n         var defer = this.$q.defer();\r\n         this.$http.get(this.baseUrl + this.entity)\r\n             .success(function (response) {\r\n                 defer.resolve(response.value);\r\n             })\r\n             .error(function (err) {\r\n                 defer.reject(err);\r\n             });\r\n         return defer.promise;\r\n     }\r\n};\r\n<\/pre>\n<p>Notice I\u2019ve captured everything that is repeated: the base portion of the URL and the wrapper that handles the promise so the result is returned and the consuming class doesn\u2019t have to understand how the collection is implemented in the API. The only difference I found between the categories and products is the name of the entity specified in the URL, so I expose that with a property on the base class that can be overridden by the service implementation. Using this base class I implement the category service like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction CategoriesService($http, $q) {\r\n     this.$http = $http;\r\n     this.$q = $q;\r\n     this.entity = 'Categories';\r\n}\r\n \r\nangular.extend(CategoriesService.prototype, baseOData);\r\n \r\napp.service('categories', CategoriesService);\r\n<\/pre>\n<p>The shell for the categories service simply sets up the dependencies and registers the entity because the base class holds all of the common functionality. The call to <strong>extend<\/strong> automatically applies the properties and functions from the base definition to the category service. Notice that I am extending the prototype; this will ensure that the properties and functions are part of any instance that is created. Angular will also bind the properties and functions so <strong>this<\/strong> refers to the instance itself.<\/p>\n<p>The products service is then implemented the same way with a different entity specified. Although I could provide a service that takes in the entity as a parameter and returns the promise (even less code), I may want to have specific properties or methods that are unique to the category and\/or product implementation. I really don\u2019t know yet so I keep them as separate components and will refactor them down to a single service if the pattern doesn\u2019t change.<\/p>\n<p>You can call extend multiple times or pass a collection of objects. This enables your components to inherit from multiple \u201cbase classes.\u201d Another way to look at it is that you can define behaviors and apply those behaviors to the class.<\/p>\n<p>I prefer the \u201ccontroller as\u201d syntax for my controller definitions. In this example the controller takes a dependency on the product and category service and exposes methods to request them that are bound to buttons. The initial implementation looked like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction Controller(products, categories) {\r\n     this.productService = products;\r\n     this.categoryService = categories;\r\n     this.products = &#x5B;];\r\n     this.categories = &#x5B;];\r\n}\r\n \r\nController.prototype.getCategories = function () {\r\n     var _this = this;\r\n     this.categoryService.get().then(function (result) {\r\n         _this.categories = result;\r\n     });\r\n};\r\n \r\nController.prototype.getProducts = function () {\r\n     var _this = this;\r\n     this.productService.get().then(function (result) {\r\n         _this.products = result;\r\n     });\r\n};\r\n \r\napp.controller('exampleCtrl', Controller);\r\n<\/pre>\n<p>Wouldn\u2019t it be nice if to encapsulate the controller functionality in a single definition? Actually, that <em>is<\/em> possible! Using <strong>extend<\/strong> I simplified the declaration for my controller by combining the functions into a single object definition. I removed the initialization of the product and categories list from the constructor and moved them into a consolidated definition that looks like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nangular.extend(Controller.prototype, {\r\n     products: &#x5B;],\r\n     categories: &#x5B;],\r\n     getCategories: function () {\r\n         var _this = this;\r\n         this.categoryService.get().then(function (result) {\r\n             _this.categories = result;\r\n         });\r\n     },\r\n     getProducts: function () {\r\n         var _this = this;\r\n         this.productService.get().then(function (result) {\r\n             _this.products = result;\r\n         });\r\n     }\r\n});\r\n<\/pre>\n<p>This convention makes it easier to group related functionality together and ensure there is a consistent implementation of <strong>this<\/strong>. The implementation is very similar to the way that TypeScript handles inheritance.<\/p>\n<p>As you can see, although the <a href=\"https:\/\/docs.angularjs.org\/api\/ng\/function\/angular.extend\" target=\"_blank\">documentation for extend<\/a> is quite simple, the functionality can be quite powerful. View the <a href=\"http:\/\/jsfiddle.net\/jeremylikness\/78y9T\/\" target=\"_blank\">source code and full working example here<\/a>.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/csharperimage.jeremylikness.com\/2014\/07\/using-angularjs-to-extend-your-code.html\">Using AngularJS to Extend Your Code Quality<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Jeremy Likness at the <a href=\"http:\/\/csharperimage.jeremylikness.com\/\">C#er : IMage<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality, increase efficiency, reduce risk and eliminate ritual and ceremony when I am developing software. Perhaps the simplest way to express this is the DRY principle (Don\u2019t Repeat Yourself). I prefer &hellip;<\/p>\n","protected":false},"author":40,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2139","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>Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,\" \/>\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\/using-angularjs-to-extend-your-code-quality\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\" \/>\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=\"2015-01-16T15:15:20+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=\"Jeremy Likness\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/jeremylikness\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeremy Likness\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 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\/using-angularjs-to-extend-your-code-quality\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\"},\"author\":{\"name\":\"Jeremy Likness\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43\"},\"headline\":\"Using AngularJS to Extend Your Code Quality\",\"datePublished\":\"2015-01-16T15:15:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\"},\"wordCount\":940,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#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\/using-angularjs-to-extend-your-code-quality\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\",\"name\":\"Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2015-01-16T15:15:20+00:00\",\"description\":\"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#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\/using-angularjs-to-extend-your-code-quality\/#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\":\"Using AngularJS to Extend Your Code Quality\"}]},{\"@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\/2cd31c082e3e1cc5f595ba18a6e03a43\",\"name\":\"Jeremy Likness\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g\",\"caption\":\"Jeremy Likness\"},\"description\":\"Jeremy Likness is a principal architect at iVision, Inc. He has been building enterprise applications using the Microsoft stack for 20 years with a focus on web-based solutions for the past 15. A prolific author and speaker, Jeremy's mission is to empower developers to create success in their careers through learning and growth.\",\"sameAs\":[\"http:\/\/csharperimage.jeremylikness.com\/\",\"http:\/\/linkedin.com\/in\/jeremylikness\",\"https:\/\/x.com\/https:\/\/twitter.com\/jeremylikness\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/jeremy-likness\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026","description":"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,","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\/using-angularjs-to-extend-your-code-quality\/","og_locale":"en_US","og_type":"article","og_title":"Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026","og_description":"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-01-16T15:15:20+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":"Jeremy Likness","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/jeremylikness","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Jeremy Likness","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/"},"author":{"name":"Jeremy Likness","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43"},"headline":"Using AngularJS to Extend Your Code Quality","datePublished":"2015-01-16T15:15:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/"},"wordCount":940,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#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\/using-angularjs-to-extend-your-code-quality\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/","name":"Using AngularJS to Extend Your Code Quality - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2015-01-16T15:15:20+00:00","description":"The AngularJS API provides a function named extend that can help improve your code quality and efficiency. I always look for ways to improve quality,","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/using-angularjs-to-extend-your-code-quality\/#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\/using-angularjs-to-extend-your-code-quality\/#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":"Using AngularJS to Extend Your Code Quality"}]},{"@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\/2cd31c082e3e1cc5f595ba18a6e03a43","name":"Jeremy Likness","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g","caption":"Jeremy Likness"},"description":"Jeremy Likness is a principal architect at iVision, Inc. He has been building enterprise applications using the Microsoft stack for 20 years with a focus on web-based solutions for the past 15. A prolific author and speaker, Jeremy's mission is to empower developers to create success in their careers through learning and growth.","sameAs":["http:\/\/csharperimage.jeremylikness.com\/","http:\/\/linkedin.com\/in\/jeremylikness","https:\/\/x.com\/https:\/\/twitter.com\/jeremylikness"],"url":"https:\/\/www.webcodegeeks.com\/author\/jeremy-likness\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2139","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\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=2139"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2139\/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=2139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=2139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=2139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}