{"id":59812,"date":"2018-05-03T11:22:27","date_gmt":"2018-05-03T05:52:27","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=59812"},"modified":"2024-04-12T14:20:48","modified_gmt":"2024-04-12T08:50:48","slug":"angular-built-in-structural-directives","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/","title":{"rendered":"Angular Built-in Structural Directives"},"content":{"rendered":"<h1>Angular Built-in Structural Directives<\/h1>\n<p>There are three kinds of directives in Angular:<\/p>\n<p>Components\u2014directives with a template.<br \/>\nStructural directives\u2014change the DOM layout by adding and removing DOM elements.<br \/>\nAttribute directives\u2014change the appearance or behavior of an element, component, or another directive.<\/p>\n<p>Components are the most common of the three directives. You saw a component for the first time in the QuickStart guide.<\/p>\n<p>Structural Directives change the structure of the view. Two examples are NgFor and NgIf. Learn about them in the Structural Directives guide.<\/p>\n<p>Attribute directives are used as attributes of elements. The built-in NgStyle directive in the Template Syntax guide, for example, can change several element styles at the same time.<\/p>\n<p><strong>NgIf directive<\/strong><\/p>\n<p>npm Package @angular\/common<br \/>\nModule import { NgIf } from &#8216;@angular\/common&#8217;;<br \/>\nSource common\/src\/directives\/ng_if.ts<\/p>\n<p>Overview<br \/>\n@Directive({ selector: &#8216;[ngIf]&#8217; })<br \/>\nclass NgIf {<br \/>\nset ngIf: any<br \/>\nset ngIfThen: TemplateRef&lt;NgIfContext&gt; | null<br \/>\nset ngIfElse: TemplateRef&lt;NgIfContext&gt; | null<br \/>\n}<\/p>\n<p>Selectors<br \/>\n[ngIf]\n<p>Inputs<br \/>\nngIf bound to NgIf.ngIf<br \/>\nngIfThen bound to NgIf.ngIfThen<br \/>\nngIfElse bound to NgIf.ngIfElse<\/p>\n<p>Description<br \/>\nConditionally includes a template based on the value of an expression.<\/p>\n<p>ngIf evaluates the expression and then renders the then or else template in its place when expression is truthy or falsy respectively. Typically the:<\/p>\n<p>then template is the inline template of ngIf unless bound to a different value.<br \/>\nelse template is blank unless it is bound.<\/p>\n<p>Most common usage<br \/>\nThe most common usage of the ngIf directive is to conditionally show the inline template as seen in this example:<\/p>\n<p>@Component({<br \/>\nselector: &#8216;ng-if-simple&#8217;,<br \/>\ntemplate: `<br \/>\n&lt;button (click)=&#8221;show = !show&#8221;&gt;{{show ? &#8216;hide&#8217; : &#8216;show&#8217;}}&lt;\/button&gt;<br \/>\nshow = {{show}}<br \/>\n&lt;br&gt;<br \/>\n&lt;div *ngIf=&#8221;show&#8221;&gt;Text to show&lt;\/div&gt;<br \/>\n`<br \/>\n})<br \/>\nclass NgIfSimple {<br \/>\nshow: boolean = true;<br \/>\n}<\/p>\n<p>Showing an alternative template using else<\/p>\n<p>If it is necessary to display a template when the expression is falsy use the else template binding as shown. Note that the else binding points to a &lt;ng-template&gt; labeled #elseBlock. The template can be defined anywhere in the component view but is typically placed right after ngIf for readability.<\/p>\n<p>@Component({<br \/>\nselector: &#8216;ng-if-else&#8217;,<br \/>\ntemplate: `<br \/>\n&lt;button (click)=&#8221;show = !show&#8221;&gt;{{show ? &#8216;hide&#8217; : &#8216;show&#8217;}}&lt;\/button&gt;<br \/>\nshow = {{show}}<br \/>\n&lt;br&gt;<br \/>\n&lt;div *ngIf=&#8221;show; else elseBlock&#8221;&gt;Text to show&lt;\/div&gt;<br \/>\n&lt;ng-template #elseBlock&gt;Alternate text while primary text is hidden&lt;\/ng-template&gt;<br \/>\n`<br \/>\n})<br \/>\nclass NgIfElse {<br \/>\nshow: boolean = true;<br \/>\n}<\/p>\n<p>Using non-inlined then template<\/p>\n<p>Usually the then template is the inlined template of the ngIf, but it can be changed using a binding (just like else). Because then and else are bindings, the template references can change at runtime as shown in this example.<\/p>\n<p>@Component({<br \/>\nselector: &#8216;ng-if-then-else&#8217;,<br \/>\ntemplate: `<br \/>\n&lt;button (click)=&#8221;show = !show&#8221;&gt;{{show ? &#8216;hide&#8217; : &#8216;show&#8217;}}&lt;\/button&gt;<br \/>\n&lt;button (click)=&#8221;switchPrimary()&#8221;&gt;Switch Primary&lt;\/button&gt;<br \/>\nshow = {{show}}<br \/>\n&lt;br&gt;<br \/>\n&lt;div *ngIf=&#8221;show; then thenBlock; else elseBlock&#8221;&gt;this is ignored&lt;\/div&gt;<br \/>\n&lt;ng-template #primaryBlock&gt;Primary text to show&lt;\/ng-template&gt;<br \/>\n&lt;ng-template #secondaryBlock&gt;Secondary text to show&lt;\/ng-template&gt;<br \/>\n&lt;ng-template #elseBlock&gt;Alternate text while primary text is hidden&lt;\/ng-template&gt;<br \/>\n`<br \/>\n})<br \/>\nclass NgIfThenElse implements OnInit {<br \/>\nthenBlock: TemplateRef&lt;any&gt;|null = null;<br \/>\nshow: boolean = true;<\/p>\n<p>@ViewChild(&#8216;primaryBlock&#8217;)<br \/>\nprimaryBlock: TemplateRef&lt;any&gt;|null = null;<br \/>\n@ViewChild(&#8216;secondaryBlock&#8217;)<br \/>\nsecondaryBlock: TemplateRef&lt;any&gt;|null = null;<\/p>\n<p>switchPrimary() {<br \/>\nthis.thenBlock = this.thenBlock === this.primaryBlock ? this.secondaryBlock : this.primaryBlock;<br \/>\n}<\/p>\n<p>ngOnInit() { this.thenBlock = this.primaryBlock; }<br \/>\n}<\/p>\n<p>Storing conditional result in a variable<\/p>\n<p>A common pattern is that we need to show a set of properties from the same object. If the object is undefined, then we have to use the safe-traversal-operator ?. to guard against dereferencing a null value. This is especially the case when waiting on async data such as when using the async pipe as shown in following example:<\/p>\n<p>Hello {{ (userStream|async)?.last }}, {{ (userStream|async)?.first }}!<\/p>\n<p>There are several inefficiencies in the above example:<\/p>\n<p>We create multiple subscriptions on userStream. One for each async pipe, or two in the example above.<br \/>\nWe cannot display an alternative screen while waiting for the data to arrive asynchronously.<br \/>\nWe have to use the safe-traversal-operator ?. to access properties, which is cumbersome.<br \/>\nWe have to place the async pipe in parenthesis.<\/p>\n<p>A better way to do this is to use ngIf and store the result of the condition in a local variable as shown in the the example below:<\/p>\n<p>@Component({<br \/>\nselector: &#8216;ng-if-let&#8217;,<br \/>\ntemplate: `<br \/>\n&lt;button (click)=&#8221;nextUser()&#8221;&gt;Next User&lt;\/button&gt;<br \/>\n&lt;br&gt;<br \/>\n&lt;div *ngIf=&#8221;userObservable | async as user; else loading&#8221;&gt;<br \/>\nHello {{user.last}}, {{user.first}}!<br \/>\n&lt;\/div&gt;<br \/>\n&lt;ng-template #loading let-user&gt;Waiting&#8230; (user is {{user|json}})&lt;\/ng-template&gt;<br \/>\n`<br \/>\n})<br \/>\nclass NgIfAs {<br \/>\nuserObservable = new Subject&lt;{first: string, last: string}&gt;();<br \/>\nfirst = [&#8216;John&#8217;, &#8216;Mike&#8217;, &#8216;Mary&#8217;, &#8216;Bob&#8217;];<br \/>\nfirstIndex = 0;<br \/>\nlast = [&#8216;Smith&#8217;, &#8216;Novotny&#8217;, &#8216;Angular&#8217;];<br \/>\nlastIndex = 0;<\/p>\n<p>nextUser() {<br \/>\nlet first = this.first[this.firstIndex++];<br \/>\nif (this.firstIndex &gt;= this.first.length) this.firstIndex = 0;<br \/>\nlet last = this.last[this.lastIndex++];<br \/>\nif (this.lastIndex &gt;= this.last.length) this.lastIndex = 0;<br \/>\nthis.userObservable.next({first, last});<br \/>\n}<br \/>\n}<\/p>\n<p>Notice that:<\/p>\n<p>We use only one async pipe and hence only one subscription gets created.<br \/>\nngIf stores the result of the userStream|async in the local variable user.<br \/>\nThe local user can then be bound repeatedly in a more efficient way.<br \/>\nNo need to use the safe-traversal-operator ?. to access properties as ngIf will only display the data if userStream returns a value.<br \/>\nWe can display an alternative template while waiting for the data.<\/p>\n<p>Syntax<\/p>\n<p>Simple form:<\/p>\n<p>&lt;div *ngIf=&#8221;condition&#8221;&gt;&#8230;&lt;\/div&gt;<br \/>\n&lt;ng-template [ngIf]=&#8221;condition&#8221;&gt;&lt;div&gt;&#8230;&lt;\/div&gt;&lt;\/ng-template&gt;<\/p>\n<p>Form with an else block:<\/p>\n<p>&lt;div *ngIf=&#8221;condition; else elseBlock&#8221;&gt;&#8230;&lt;\/div&gt;<br \/>\n&lt;ng-template #elseBlock&gt;&#8230;&lt;\/ng-template&gt;<\/p>\n<p>Form with a then and else block:<\/p>\n<p>&lt;div *ngIf=&#8221;condition; then thenBlock else elseBlock&#8221;&gt;&lt;\/div&gt;<br \/>\n&lt;ng-template #thenBlock&gt;&#8230;&lt;\/ng-template&gt;<br \/>\n&lt;ng-template #elseBlock&gt;&#8230;&lt;\/ng-template&gt;<\/p>\n<p>Form with storing the value locally:<\/p>\n<p>&lt;div *ngIf=&#8221;condition as value; else elseBlock&#8221;&gt;{{value}}&lt;\/div&gt;<br \/>\n&lt;ng-template #elseBlock&gt;&#8230;&lt;\/ng-template&gt;<\/p>\n<p>Static Members<br \/>\nConstructor<\/p>\n<p>constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef&lt;NgIfContext&gt;)<\/p>\n<p>Members<\/p>\n<p>set ngIf: any<\/p>\n<p>set ngIfThen: TemplateRef&lt;NgIfContext&gt; | null<\/p>\n<p>set ngIfElse: TemplateRef&lt;NgIfContext&gt; | null<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>NgSwitch directive<\/strong><\/p>\n<p>npm Package @angular\/common<br \/>\nModule import { NgSwitch } from &#8216;@angular\/common&#8217;;<br \/>\nSource common\/src\/directives\/ng_switch.ts<br \/>\nNgModule CommonModule<\/p>\n<p>Adds \/ removes DOM sub-trees when the nest match expressions matches the switch expression.<\/p>\n<p>Overview<br \/>\n@Directive({ selector: &#8216;[ngSwitch]&#8217; })<br \/>\nclass NgSwitch {<br \/>\nset ngSwitch: any<br \/>\n}<\/p>\n<p>How To Use<br \/>\n&lt;container-element [ngSwitch]=&#8221;switch_expression&#8221;&gt;<br \/>\n&lt;some-element *ngSwitchCase=&#8221;match_expression_1&#8243;&gt;&#8230;&lt;\/some-element&gt;<br \/>\n&lt;some-element *ngSwitchCase=&#8221;match_expression_2&#8243;&gt;&#8230;&lt;\/some-element&gt;<br \/>\n&lt;some-other-element *ngSwitchCase=&#8221;match_expression_3&#8243;&gt;&#8230;&lt;\/some-other-element&gt;<br \/>\n&lt;ng-container *ngSwitchCase=&#8221;match_expression_3&#8243;&gt;<br \/>\n&lt;!&#8211; use a ng-container to group multiple root nodes &#8211;&gt;<br \/>\n&lt;inner-element&gt;&lt;\/inner-element&gt;<br \/>\n&lt;inner-other-element&gt;&lt;\/inner-other-element&gt;<br \/>\n&lt;\/ng-container&gt;<br \/>\n&lt;some-element *ngSwitchDefault&gt;&#8230;&lt;\/some-element&gt;<br \/>\n&lt;\/container-element&gt;<\/p>\n<p>Selectors<br \/>\n[ngSwitch]\n<p>Inputs<br \/>\nngSwitch bound to NgSwitch.ngSwitch<\/p>\n<p>Description<br \/>\nNgSwitch stamps out nested views when their match expression value matches the value of the switch expression.<\/p>\n<p>In other words:<\/p>\n<p>you define a container element (where you place the directive with a switch expression on the [ngSwitch]=&#8221;&#8230;&#8221; attribute)<br \/>\nyou define inner views inside the NgSwitch and place a *ngSwitchCase attribute on the view root elements.<\/p>\n<p>Elements within NgSwitch but outside of a NgSwitchCase or NgSwitchDefault directives will be preserved at the location.<\/p>\n<p>The ngSwitchCase directive informs the parent NgSwitch of which view to display when the expression is evaluated. When no matching expression is found on a ngSwitchCase view, the ngSwitchDefault view is stamped out.<\/p>\n<p>Members<br \/>\nset ngSwitch: any<\/p>\n<p>&nbsp;<\/p>\n<p class=\"VSKILLbodytext\"><strong>IT Professionals, Web Developers, web programmers, IT students can Apply for the certification course.<\/strong><\/p>\n<p><a href=\"https:\/\/www.vskills.in\/certification\/web-development\/angular-4-certification\" rel=\"attachment wp-att-61497\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-61497\" src=\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png\" sizes=\"auto, (max-width: 1050px) 100vw, 1050px\" srcset=\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png 1050w, https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4-300x48.png 300w, https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4-768x124.png 768w, https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4-1024x165.png 1024w, https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4-712x115.png 712w\" alt=\"\" width=\"1050\" height=\"169\" \/><\/a><\/p>\n<ul>\n<li class=\"VSKILLbodytext\"><a href=\"https:\/\/www.vskills.in\/practice\/skills\/Web-Development\/Angular-4\" target=\"_blank\" rel=\"noopener\">Practice Test for Angular4 <\/a><\/li>\n<li class=\"VSKILLbodytext\"><a href=\"https:\/\/www.vskills.in\/certification\/web-development\/angular-4-certification\" target=\"_blank\" rel=\"noopener\">Govt Certification in Angular 4<\/a><\/li>\n<li><a href=\"https:\/\/www.vskills.in\/certification\/blog\/\">Blog posts on Angular 4 and Web Development<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/web-development\/angular-4\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-55483 size-full\" src=\"http:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/05\/Back-Arrow.jpg\" alt=\"Angular 4 Tutorial Index\" width=\"47\" height=\"52\" \/>Back to Angular 4 Tutorial Main Page <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Angular Built-in Structural Directives There are three kinds of directives in Angular: Components\u2014directives with a template. Structural directives\u2014change the DOM layout by adding and removing DOM elements. Attribute directives\u2014change the appearance or behavior of an element, component, or another directive. Components are the most common of the three directives. You saw a component for the&#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":[7230,7231,5743],"tags":[7221,7227,7235,7357,7356,7236,7226,7234,7232,7223,7233],"class_list":["post-59812","page","type-page","status-publish","hentry","category-angular-2","category-angular-4","category-web-development","tag-angular","tag-angular-4","tag-angular-4-tutorial","tag-angular-built-in-structural-directive","tag-angular-built-in-structural-directives","tag-angular-cli","tag-angular-js","tag-angular-js-tutorial","tag-angular-tutorial","tag-angularjs","tag-angularjs-tutorial"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Angular Built-in Structural Directives - Tutorial<\/title>\n<meta name=\"description\" content=\"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.\" \/>\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\/angular-built-in-structural-directives\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Angular Built-in Structural Directives - Tutorial\" \/>\n<meta property=\"og:description\" content=\"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/\" \/>\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:50:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 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\/angular-built-in-structural-directives\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/\",\"name\":\"Angular Built-in Structural Directives - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png\",\"datePublished\":\"2018-05-03T05:52:27+00:00\",\"dateModified\":\"2024-04-12T08:50:48+00:00\",\"description\":\"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png\",\"width\":1050,\"height\":169},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Angular Built-in Structural Directives\"}]},{\"@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":"Angular Built-in Structural Directives - Tutorial","description":"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.","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\/angular-built-in-structural-directives\/","og_locale":"en_US","og_type":"article","og_title":"Angular Built-in Structural Directives - Tutorial","og_description":"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:50:48+00:00","og_image":[{"url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/","name":"Angular Built-in Structural Directives - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png","datePublished":"2018-05-03T05:52:27+00:00","dateModified":"2024-04-12T08:50:48+00:00","description":"LEarn and know Angular Built-in Structural Directives: There are three kinds of directives in Angular take tutorials from Vskills. Click here.","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#primaryimage","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2018\/04\/Angular-4.png","width":1050,"height":169},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/angular-built-in-structural-directives\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Angular Built-in Structural Directives"}]},{"@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\/59812","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=59812"}],"version-history":[{"count":5,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/59812\/revisions"}],"predecessor-version":[{"id":64240,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/59812\/revisions\/64240"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=59812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=59812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=59812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}