{"id":1102,"date":"2014-10-23T14:45:49","date_gmt":"2014-10-23T11:45:49","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1102"},"modified":"2014-10-23T14:36:51","modified_gmt":"2014-10-23T11:36:51","slug":"first-baby-steps-with-angular-js","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/","title":{"rendered":"First baby steps with Angular.js"},"content":{"rendered":"<p>This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just &#8220;baby steps&#8221; in that it covers the very basics that might help to get started. Since these are really my first steps with Angular, I might have misunderstood some of the stuff. So feel free to <a href=\"https:\/\/github.com\/juristr\/juristr.github.com\/edit\/master\/_posts\/2014-05-11-angular-baby-steps.md\">help me improve this article<\/a> ;)<\/p>\n<blockquote><p><strong>Info:<\/strong> the source code of some of the examples described here can be found on <a href=\"http:\/\/github.com\/juristr\/angularjs-webinar\">the GitHub repo<\/a>.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>The App<\/h2>\n<p><code>ng-app<\/code> represents the angular application. <code>ng-app=\"myApp\"<\/code> does normally have a corresponding<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp', &#x5B;]);<\/pre>\n<p>in some JavaScript file.<\/p>\n<h2>Data Binding<\/h2>\n<p><code>{{}}<\/code> are placeholders in HTML that are being interpreted by Angular. Similar as in other popular templating engines like <a href=\"http:\/\/mustache.github.io\/\">Mustache<\/a>. It only represents a <strong>unidirectional<\/strong> binding though.<\/p>\n<p><code>ng-init=\"text=Hello World\"<\/code> allows to introduce variables. After such a declaration you can reference <code>text<\/code> and its value.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;div ng-init='text='Hello World''&gt;\r\n  &lt;p&gt;Value: {{ text }}&lt;\/p&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>If we want to achieve <strong>bidirectional bindings<\/strong> then we have to use <code>ng-model<\/code>.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;input ng-model='text'\/&gt;<\/pre>\n<h2>Controllers<\/h2>\n<p>As one would assume, <strong>controllers<\/strong> are responsible for a certain HTML area they are bound to.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;body ng-controller='MyController'&gt;\r\n  &lt;p&gt;{{ welcomeMessage }}&lt;\/p&gt;\r\n&lt;\/body<\/pre>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n  .controller('MyController', &#x5B;'$scope', function($scope){\r\n    $scope.welcomeMessage = 'Hi, welcome to the Angular tutorial';\r\n\r\n    $scope.sayHello = function(name){\r\n      alert('Hi ' + name);\r\n    };\r\n  }]);<\/pre>\n<h2>Filters<\/h2>\n<p>What is quite handy on the output is that there are lots of <strong>filters<\/strong> available that allow you to customize it, like reversing the output:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">{{ welcomeMessage | reverse }}<\/pre>\n<p>Pipes (<code>|<\/code>) are used to apply the filter to some value. You can also combine several once (just like unix pipes). There are predefined ones on the official <a href=\"https:\/\/docs.angularjs.org\/api\/ng\/filter\">docs for predefined ones<\/a> and custom ones like our reverse filter above. Implementing it is quite simple:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n\r\n    \/\/ factory function\r\n    .filter('reverse', function (){\r\n        \/\/ directly return a function\r\n        return function(text){\r\n            text = '' + text;\r\n\r\n            \/\/ execute reversing\r\n            return text.split('').reverse().join('');\r\n        }\r\n    });<\/pre>\n<h2>Events and Services<\/h2>\n<p>Similarly as simply binding values you can also attach click handlers like<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;body ng-controller='MyController'&gt;\r\n  &lt;input type='text' ng-model='name' \/&gt;\r\n  &lt;button ng-click='sayHello(name)'&gt;Say Hello&lt;\/button&gt;\r\n&lt;\/body&gt;<\/pre>\n<p>Note how the databound variable <code>name<\/code> can be directly passed to the <code>sayHello(..)<\/code> function.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n  .controller('MyController', &#x5B;'$scope', function($scope){\r\n    $scope.welcomeMessage = 'Hi, welcome to the Angular tutorial';\r\n\r\n    $scope.sayHello = function(name){\r\n      alert('Hi ' + name);\r\n    };\r\n  }]);<\/pre>\n<p>In order to not fill up the controller with lots of logic, you should extract them in re-usable services.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n  .factory('MyGreetingService', function(){\r\n    return {\r\n      sayHello: function(name){\r\n        alert('Hi ' + name);\r\n      }\r\n    };\r\n  });<\/pre>\n<p>The above construct represents a factory method for creating the service which is uniquely identified by <code>MyGreetingService<\/code>. Note that services are <strong>singletons<\/strong>.<\/p>\n<p>On the controller you then <em>inject<\/em> the service as follows:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n  .controller('MyController', &#x5B;'$scope', 'MyGreetingService', function($scope, greetingService){\r\n    ...\r\n\r\n    $scope.sayHello = function(name){\r\n      \/\/ invoke the service\r\n      greetingService.sayHello(name);\r\n    };\r\n  }]);<\/pre>\n<p>Variables prefixed by <code>$<\/code> are those provided by Angular.<\/p>\n<h2>Directives<\/h2>\n<p>Another powerful concept of Angular are <strong>directives<\/strong>. They aim at bringing <a href=\"http:\/\/www.w3.org\/TR\/components-intro\/\">web components<\/a> to you, augmenting the HTML with custom elements.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;hello-world&gt;&lt;\/hello-world&gt;<\/pre>\n<p>The <code>&lt;hello-world&gt;<\/code> is implemented as follows:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp')\r\n    \/\/ the name of the directive defines the final HTML tag that\r\n    \/\/ has to be used.\r\n    .directive('helloWorld', function(){\r\n        return {\r\n            restrict: 'E', \/\/E=Element, A=attribute, C=css class or combined EAC\r\n            \/\/template: '&lt;p&gt;Hello, world!&lt;\/p&gt;', \/\/inline specification\r\n            templateUrl: 'helloWorldPartial.html' \/\/load from HTML file\r\n        }\r\n    });<\/pre>\n<p>The <code>restrict<\/code> property specifies the kind of element, whether it is a HTML element, an attribute or CSS class. You can also mix more of them.<br \/>\nThe rendered template can be either specified inline using the <code>template<\/code> property or in a separate file, using <code>templateUrl<\/code>. The latter one is the suggested way especially when you have more complex HTML code.<\/p>\n<blockquote><p><strong>Note:<\/strong> HTML isn&#8217;t case sensitive and as such also custom HTML tags should not be written in camel case but rather be separated by a dash.<\/p><\/blockquote>\n<p>If you want to get a deep-dive into how directives work I absolutely suggest you <a href=\"http:\/\/youtu.be\/WqmeI5fZcho\">Misko Hevery&#8217;s meetup video<\/a>.<\/p>\n<h2>Structuring and Modules<\/h2>\n<p>An Angular module is defined like<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp', &#x5B;]);<\/pre>\n<p>This example code shows the definition of the application in <code>myApp.js<\/code>. While there is no restriction on how an Angular application should be structured, a module\/widget structure is suggested. Hence, rather than organizing your app in <code>controllers<\/code>, <code>models<\/code> and <code>views<\/code> folder&#8230;<\/p>\n<figure id=\"attachment_1229\" aria-describedby=\"caption-attachment-1229\" style=\"width: 850px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-bad-organization-copy.jpg\"><img decoding=\"async\" class=\"wp-image-1229 size-full\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-bad-organization-copy.jpg\" alt=\"angular-bad-organization copy\" width=\"850\" height=\"391\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-bad-organization-copy.jpg 850w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-bad-organization-copy-300x138.jpg 300w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a><figcaption id=\"caption-attachment-1229\" class=\"wp-caption-text\">Bad organization.\u00a0<a href=\"http:\/\/trochette.github.io\/Angular-Design-Patterns-Best-Practices\/#\/socks_drawer\">Source<\/a><\/figcaption><\/figure>\n<p>..structure it according to the functionalities or modules, like <code>calculator<\/code>, <code>contacts<\/code> etc., depending on the kind of application you&#8217;re creating.<\/p>\n<figure id=\"attachment_1230\" aria-describedby=\"caption-attachment-1230\" style=\"width: 850px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-suggested-organization-copy.jpg\"><img decoding=\"async\" class=\"wp-image-1230 size-full\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-suggested-organization-copy.jpg\" alt=\"angular-suggested-organization copy\" width=\"850\" height=\"378\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-suggested-organization-copy.jpg 850w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angular-suggested-organization-copy-300x133.jpg 300w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a><figcaption id=\"caption-attachment-1230\" class=\"wp-caption-text\">Suggested organization. Source:\u00a0<a href=\"http:\/\/trochette.github.io\/Angular-Design-Patterns-Best-Practices\/#\/socks_drawer\">Source<\/a><\/figcaption><\/figure>\n<p>I did already write about such <a href=\"\/blog\/2013\/04\/modularity-in-javascript-frameworks\/\">modularity in JavaScript MVC applications<\/a>.<\/p>\n<p>In <a href=\"https:\/\/github.com\/juristr\/angularjs-webinar\">my example code<\/a> I have an app that contains a &#8220;calculator&#8221; module. The folder structure looks like<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">- &lt;calculator&gt;\r\n  - calculatorController.js\r\n  - calculatorService.js\r\n  - index.js<\/pre>\n<p>The <code>index.js<\/code> defines the module:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('calculator', &#x5B;]);<\/pre>\n<p>Each of the other files like the controller and service have to be defined within that module.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('calculator')\r\n    .controller('CalculatorController',...<\/pre>\n<p>Finally, <code>myApp<\/code> needs to load the module (in <code>myApp.js<\/code>):<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">angular.module('myApp', &#x5B;\r\n  'calculator'\r\n]);<\/pre>\n<p>What&#8217;s kind&#8217;a odd is that although <code>CalculatorController<\/code> is defined within the <code>calculator<\/code> module, you don&#8217;t have to prefix it in the HTML code:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;div ng-controller='CalculatorController'&gt;...&lt;\/div&gt;<\/pre>\n<p>Wait, this might get tricky and lead to potential name clashes when including multiple modules. Yep, and it seems like currently this is the solution:<\/p>\n<blockquote><p>As of today AngularJS doesn&#8217;t handle namespace collisions for services so if you&#8217;ve got 2 different modules with the service named the same way and you include both modules in your app, only one service will be available.<br \/>\nFor the moment the best option is to prefix service names with a custom prefix&#8230; <cite><a href=\"http:\/\/stackoverflow.com\/a\/14909537\/50109\">StackOverflow<\/a><\/cite><\/p><\/blockquote>\n<h2>Where&#8217;s jQuery?<\/h2>\n<p>Can I use it? Angular uses a lite version of jQuery. The suggested approach is to avoid using jQuery directly and go as far as you can by using directives, controllers and live binding. However, jQuery can obviously be included. If so, you need to include it <strong>before the angular.js<\/strong> script include.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;head&gt;\r\n  &lt;script type='text\/javascript' src='jQuery.js'&gt;&lt;\/script&gt;\r\n  &lt;script type='text\/javascript' src='angular.js'&gt;&lt;\/script&gt;\r\n  ...\r\n&lt;\/head&gt;<\/pre>\n<p>Angular will detect it and use the included jQuery version rather than its own lite version of it.<\/p>\n<p>Generally speaking <strong>the use of jQuery should dramatically decrease due to live binding and Angular directives<\/strong>.<\/p>\n<h2>There&#8217;s a lot more&#8230;<\/h2>\n<p>This article really just covers what was covered in the webinar. There&#8217;s a lot more that has to be taken a look at in order to create a fully featured single page application like routing, views, unit testing&#8230;<\/p>\n<h2>Question to the speaker<\/h2>\n<p>Here are two questions I posed to the speaker.<\/p>\n<p><strong>You mentioned about using Angular directives sparingly. Why?<\/strong><\/p>\n<ul>\n<li>Not use directives for everything, but just where it makes sense, i.e. when you create a list with a simple filter you might be better served by simply using a controller.<\/li>\n<li>Not due to performance issues<\/li>\n<li>directives for having reusable HTML elements (web components)<\/li>\n<\/ul>\n<p><strong>What would be the &#8220;model&#8221; of M-VC in Angular?<\/strong><\/p>\n<p>There isn&#8217;t a model like it may be known from other frameworks. The &#8220;model&#8221; of Angular is somehow the combination of <code>$scope<\/code>, the data binding and the services if we wish..<br \/>\nAngular uses more a MVVM variation of the classic MVC.<\/p>\n<h2>Useful Links<\/h2>\n<ul>\n<li><a href=\"https:\/\/angularjs.org\/\">https:\/\/angularjs.org\/<\/a><\/li>\n<li><a href=\"https:\/\/docs.angularjs.org\/api\/ng\/service\">https:\/\/docs.angularjs.org\/api\/ng\/service<\/a><\/li>\n<li><a href=\"https:\/\/docs.angularjs.org\/tutorial\">https:\/\/docs.angularjs.org\/tutorial<\/a><\/li>\n<li><a href=\"https:\/\/docs.angularjs.org\/api\">https:\/\/docs.angularjs.org\/api<\/a><\/li>\n<li><a href=\"https:\/\/docs.angularjs.org\/guide\">https:\/\/docs.angularjs.org\/guide<\/a><\/li>\n<li><a href=\"http:\/\/angularjs.de\/\">http:\/\/angularjs.de\/<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\">StackOverflow obviously ;)<\/a><\/li>\n<li><a href=\"http:\/\/trochette.github.io\/Angular-Design-Patterns-Best-Practices\/\">Angular Design Patterns best practices<\/a>\n<ul>\n<li><a href=\"https:\/\/github.com\/trochette\/Angular-Design-Patterns-Best-Practices\">GitHub repo<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/github.com\/mgechev\/angularjs-in-patterns\">Angular.js in Patterns<\/a><\/li>\n<\/ul>\n<blockquote><p><strong>Info:<\/strong> the source code of some of the examples described here can be found on <a href=\"http:\/\/github.com\/juristr\/angularjs-webinar\">the GitHub repo<\/a>.<\/p><\/blockquote>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/juristr.com\/blog\/2014\/05\/angular-baby-steps\/\">First baby steps with Angular.js<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Juri Strumpflohner at the <a href=\"http:\/\/juristr.com\/blog\/\">Juri Strumpflohner&#8217;s TechBlog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just &#8220;baby steps&#8221; in that it covers the very basics that might help to get started. Since these are really my first steps with Angular, I might have misunderstood some of the stuff. So feel free &hellip;<\/p>\n","protected":false},"author":5,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-1102","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>First baby steps with Angular.js - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just &quot;baby steps&quot; in that it covers the\" \/>\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\/first-baby-steps-with-angular-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"First baby steps with Angular.js - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just &quot;baby steps&quot; in that it covers the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\" \/>\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=\"2014-10-23T11:45:49+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=\"Juri Strumpflohner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/juristr\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juri Strumpflohner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 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\/first-baby-steps-with-angular-js\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\"},\"author\":{\"name\":\"Juri Strumpflohner\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060\"},\"headline\":\"First baby steps with Angular.js\",\"datePublished\":\"2014-10-23T11:45:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\"},\"wordCount\":1374,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#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\/first-baby-steps-with-angular-js\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\",\"name\":\"First baby steps with Angular.js - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2014-10-23T11:45:49+00:00\",\"description\":\"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just \\\"baby steps\\\" in that it covers the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#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\/first-baby-steps-with-angular-js\/#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\":\"First baby steps with Angular.js\"}]},{\"@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\/33d3ee7edb105a80f1ff7199925b3060\",\"name\":\"Juri Strumpflohner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g\",\"caption\":\"Juri Strumpflohner\"},\"description\":\"Juri Strumpflohner mainly operates in the web sector developing rich applications with HTML5 and JavaScript. Beside having a Java background and developing Android applications he currently works as a software architect in the e-government sector. When he\u2019s not coding or blogging about his newest discoveries, he is practicing Yoseikan Budo where he owns a 2nd DAN.\",\"sameAs\":[\"http:\/\/juristr.com\/blog\/\",\"http:\/\/linkedin.com\/in\/juristr\/\",\"https:\/\/x.com\/http:\/\/twitter.com\/juristr\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/juri-strumpflohner\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"First baby steps with Angular.js - Web Code Geeks - 2026","description":"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just \"baby steps\" in that it covers the","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\/first-baby-steps-with-angular-js\/","og_locale":"en_US","og_type":"article","og_title":"First baby steps with Angular.js - Web Code Geeks - 2026","og_description":"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just \"baby steps\" in that it covers the","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2014-10-23T11:45:49+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":"Juri Strumpflohner","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/juristr","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Juri Strumpflohner","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/"},"author":{"name":"Juri Strumpflohner","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/33d3ee7edb105a80f1ff7199925b3060"},"headline":"First baby steps with Angular.js","datePublished":"2014-10-23T11:45:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/"},"wordCount":1374,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#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\/first-baby-steps-with-angular-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/","name":"First baby steps with Angular.js - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2014-10-23T11:45:49+00:00","description":"This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just \"baby steps\" in that it covers the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/first-baby-steps-with-angular-js\/#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\/first-baby-steps-with-angular-js\/#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":"First baby steps with Angular.js"}]},{"@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\/33d3ee7edb105a80f1ff7199925b3060","name":"Juri Strumpflohner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/45338315375849845e4c4b30f52cb417221e2d9a7e688785e4dd2af0e624a260?s=96&d=mm&r=g","caption":"Juri Strumpflohner"},"description":"Juri Strumpflohner mainly operates in the web sector developing rich applications with HTML5 and JavaScript. Beside having a Java background and developing Android applications he currently works as a software architect in the e-government sector. When he\u2019s not coding or blogging about his newest discoveries, he is practicing Yoseikan Budo where he owns a 2nd DAN.","sameAs":["http:\/\/juristr.com\/blog\/","http:\/\/linkedin.com\/in\/juristr\/","https:\/\/x.com\/http:\/\/twitter.com\/juristr"],"url":"https:\/\/www.webcodegeeks.com\/author\/juri-strumpflohner\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1102","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1102\/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=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}