{"id":72288,"date":"2020-01-13T17:00:21","date_gmt":"2020-01-13T11:30:21","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=72288"},"modified":"2024-04-12T14:22:51","modified_gmt":"2024-04-12T08:52:51","slug":"angularjs-concepts","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/","title":{"rendered":"AngularJS Concepts"},"content":{"rendered":"<p>Various concepts of AngularJS are discussed.<\/p>\n<h4>AngularJS and Javascript<\/h4>\n<p>AngularJS is a JavaScript framework. It can be added to an HTML page with a &lt;script&gt; tag. AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as a JavaScript file, and can be added to a web page with a script tag:<\/p>\n<p>&lt;script src=&#8221;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.6.9\/angular.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<h4>AngularJS and HTML<\/h4>\n<p>AngularJS extends HTML with ng-directives. The ng-app directive defines an AngularJS application. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data. The ng-bind directive binds application data to the HTML view.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;script src=&#8221;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.6.9\/angular.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;div ng-app=&#8221;&#8221;&gt;<\/p>\n<p>&lt;p&gt;Name: &lt;input type=&#8221;text&#8221; ng-model=&#8221;name&#8221;&gt;&lt;\/p&gt;<\/p>\n<p>&lt;p ng-bind=&#8221;name&#8221;&gt;&lt;\/p&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>Example explained:<\/p>\n<p>AngularJS starts automatically when the web page has loaded. The ng-app directive tells AngularJS that the &lt;div&gt; element is the &#8220;owner&#8221; of an AngularJS application.<\/p>\n<p>The ng-model directive binds the value of the input field to the application variable name. The ng-bind directive binds the innerHTML of the &lt;p&gt; element to the application variable name.<\/p>\n<h4>AngularJS Directives<\/h4>\n<p>AngularJS directives are HTML attributes with an ng prefix. The ng-init directive initializes AngularJS application variables.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;div ng-app=&#8221;&#8221; ng-init=&#8221;firstName=&#8217;Demo'&#8221;&gt;<\/p>\n<p>&lt;p&gt;The name is &lt;span ng-bind=&#8221;firstName&#8221;&gt;&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<h4>AngularJS Expressions<\/h4>\n<p>AngularJS expressions are written inside double braces: {{ expression }}. AngularJS will &#8220;output&#8221; data exactly where the expression is written:<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;script src=&#8221;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.6.9\/angular.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;div ng-app=&#8221;&#8221;&gt;<\/p>\n<p>&lt;p&gt;My first expression: {{ 5 + 5 }}&lt;\/p&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>AngularJS expressions bind AngularJS data to HTML the same way as the ng-bind directive.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;script src=&#8221;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.6.9\/angular.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;div ng-app=&#8221;&#8221;&gt;<\/p>\n<p>&lt;p&gt;Name: &lt;input type=&#8221;text&#8221; ng-model=&#8221;name&#8221;&gt;&lt;\/p&gt;<\/p>\n<p>&lt;p&gt;{{name}}&lt;\/p&gt;<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<h4>AngularJS Applications<\/h4>\n<p>AngularJS modules define AngularJS applications. AngularJS controllers control AngularJS applications. The ng-app directive defines the application, the ng-controller directive defines the controller.<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;div ng-app=&#8221;myApp&#8221; ng-controller=&#8221;myCtrl&#8221;&gt;<\/p>\n<p>First Name: &lt;input type=&#8221;text&#8221; ng-model=&#8221;firstName&#8221;&gt;&lt;br&gt;<\/p>\n<p>Last Name: &lt;input type=&#8221;text&#8221; ng-model=&#8221;lastName&#8221;&gt;&lt;br&gt;<\/p>\n<p>&lt;br&gt;<\/p>\n<p>Full Name: {{firstName + &#8221; &#8221; + lastName}}<\/p>\n<p>&lt;\/div&gt;<\/p>\n<p>&lt;script&gt;<\/p>\n<p>var app = angular.module(&#8216;myApp&#8217;, []);<\/p>\n<p>app.controller(&#8216;myCtrl&#8217;, function($scope) {<\/p>\n<p>$scope.firstName= &#8220;Demo&#8221;;<\/p>\n<p>$scope.lastName= &#8220;User&#8221;;<\/p>\n<p>});<\/p>\n<p>&lt;\/script&gt;<\/p>\n<p>AngularJS modules define applications:<\/p>\n<p><strong>AngularJS Module<\/strong><\/p>\n<p>var app = angular.module(&#8216;myApp&#8217;, []);<\/p>\n<p>AngularJS controllers control applications:<\/p>\n<p><strong>AngularJS Controller<\/strong><\/p>\n<p>app.controller(&#8216;myCtrl&#8217;, function($scope) {<\/p>\n<p>$scope.firstName= &#8220;Demo&#8221;;<\/p>\n<p>$scope.lastName= &#8220;User&#8221;;<\/p>\n<p>});<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Various concepts of AngularJS are discussed. AngularJS and Javascript AngularJS is a JavaScript framework. It can be added to an HTML page with a &lt;script&gt; tag. AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[8417],"tags":[8419],"class_list":["post-72288","page","type-page","status-publish","hentry","category-angular-js-web-development","tag-angularjs-concepts"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AngularJS Concepts - Tutorial<\/title>\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.vskills.in\/certification\/tutorial\/angularjs-concepts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AngularJS Concepts - Tutorial\" \/>\n<meta property=\"og:description\" content=\"Various concepts of AngularJS are discussed. AngularJS and Javascript AngularJS is a JavaScript framework. It can be added to an HTML page with a &lt;script&gt; tag. AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:52:51+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/\",\"name\":\"AngularJS Concepts - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2020-01-13T11:30:21+00:00\",\"dateModified\":\"2024-04-12T08:52:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AngularJS Concepts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AngularJS Concepts - Tutorial","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.vskills.in\/certification\/tutorial\/angularjs-concepts\/","og_locale":"en_US","og_type":"article","og_title":"AngularJS Concepts - Tutorial","og_description":"Various concepts of AngularJS are discussed. AngularJS and Javascript AngularJS is a JavaScript framework. It can be added to an HTML page with a &lt;script&gt; tag. AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:52:51+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/","name":"AngularJS Concepts - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2020-01-13T11:30:21+00:00","dateModified":"2024-04-12T08:52:51+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angularjs-concepts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AngularJS Concepts"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/72288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=72288"}],"version-history":[{"count":3,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/72288\/revisions"}],"predecessor-version":[{"id":72508,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/72288\/revisions\/72508"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=72288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=72288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=72288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}