<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3412955273500440667</id><updated>2022-03-28T11:25:56.702-07:00</updated><category term="Ionic"/><category term="Troubleshooting"/><category term="angular 4"/><category term="ionic 2"/><category term="angular 6"/><category term="Android"/><category term="Tips and Tricks"/><category term="angular"/><category term="ionic framework"/><category term="Angular 2"/><category term="Angular 5"/><category term="Dojo"/><category term="Dojo 2"/><category term="Social Networks"/><category term="angular js"/><category term="ios"/><category term="Browser"/><category term="Chrome"/><category term="Delete Cookies"/><category term="Facebook"/><category term="Mapbox"/><category term="Mapbox GL JS"/><category term="Mobile Applications"/><category term="Unlock Pattern"/><category term="Windows Applications"/><category term="cookies"/><category term="how to"/><category term="ionic 3"/><category term="ionic and mapbox"/><category term="ios8"/><category term="ipad"/><category term="iphone"/><category term="ipod"/><category term="mapbox maps"/><category term="maps"/><category term="widget creation dojo 2"/><category term="@Input"/><category term="@output"/><category term="Android Gallery"/><category term="Android Studio"/><category term="Angular Decorators"/><category term="Angular EventEmitters"/><category term="Angular Input Decorator"/><category term="Angular Output Decorator"/><category term="Angular Tabs"/><category term="Clear History"/><category term="Connectify"/><category term="Delete Google chrome cookies"/><category term="Delete History"/><category term="Dojo 2 application widget"/><category term="Dynamic Tabs"/><category term="Encryption unsuccessful"/><category term="Firfox"/><category term="GRUB"/><category term="Google chrome"/><category term="Install Dojo 2"/><category term="Loading Controller"/><category term="Loading Indicator"/><category term="ModalController"/><category term="Opera Mini"/><category term="Publishing and Subscribing to Events"/><category term="Remove Picasa Albums"/><category term="Tabs in Angular"/><category term="Tabs system in Angular"/><category term="Tech News"/><category term="Unlock Samsung Galaxy S"/><category term="Unlock samsung broken screen"/><category term="WiFi Hotspot"/><category term="Word Cloud in Angular"/><category term="android broken scrren"/><category term="android emulator"/><category term="angular how to"/><category term="angular wordcloud"/><category term="angular-dual-listbox"/><category term="apple"/><category term="ckeditor"/><category term="datatable angular"/><category term="datatables in angular"/><category term="date picker"/><category term="dojo 2 widgets"/><category term="dual-listbox"/><category term="eventemitter"/><category term="events"/><category term="firefox browser"/><category term="gowriter"/><category term="infinite scroll"/><category term="ion-datetime"/><category term="ionic 2 Events"/><category term="ionic 2 infinite scroll"/><category term="ionic 2 modal"/><category term="ionic 3 modal"/><category term="ionic Events"/><category term="ionic popover"/><category term="ionic scroll"/><category term="ionic split pane"/><category term="ionsplitpane"/><category term="js"/><category term="move items"/><category term="multi select"/><category term="multi select in angular"/><category term="ng2-ckeditor"/><category term="ngx-datatable"/><category term="ngx-datatable in angular"/><category term="npm"/><category term="open modal in ionic"/><category term="popover"/><category term="popover onDidDismiss"/><category term="remove grub"/><category term="samsung Screen broken unlock"/><category term="samsung galaxy s hard reset"/><category term="samsung galaxy s pattern lock"/><category term="twitter"/><category term="typescript"/><category term="unlock samsung galaxy s3"/><category term="windows"/><category term="windows 7"/><category term="windows recovery"/><category term="windows unix dual boot"/><category term="word cloud"/><category term="word cloud implementation in angular"/><title type='text'>Information and Technology  Blog  - Gowriter</title><subtitle type='html'>Gowriter Provides you with all the information regarding programming languages.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.gowriter.in/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default?start-index=26&amp;max-results=25'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-4642424536032264739</id><published>2019-02-11T23:01:00.004-08:00</published><updated>2019-02-11T23:06:20.437-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="angular"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular 2"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular 5"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="angular how to"/><category scheme="http://www.blogger.com/atom/ns#" term="angular-dual-listbox"/><category scheme="http://www.blogger.com/atom/ns#" term="dual-listbox"/><category scheme="http://www.blogger.com/atom/ns#" term="multi select"/><category scheme="http://www.blogger.com/atom/ns#" term="multi select in angular"/><title type='text'>How to implement angular-dual-listbox in Angular Project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In this post we are going to see on how to implement multi select using a node module called angular-dual-listbox. you can find the link to the node module &lt;a href=&quot;https://www.npmjs.com/package/dual-listbox&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-1ojCzXJLfw0/XGJutTHH-jI/AAAAAAAABAM/yVy4V2nRhQEFOEEcQgZv1omBO6ddx992ACLcBGAs/s1600/mult%2Bimg.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;398&quot; data-original-width=&quot;1341&quot; height=&quot;180&quot; src=&quot;https://3.bp.blogspot.com/-1ojCzXJLfw0/XGJutTHH-jI/AAAAAAAABAM/yVy4V2nRhQEFOEEcQgZv1omBO6ddx992ACLcBGAs/s640/mult%2Bimg.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;u style=&quot;background-color: white; box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;Installation:&lt;/u&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;First of all install the angular-dual-listbox&amp;nbsp;node module into your Angular project using the following command given below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;npm i angular-dual-listbox --save &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;for the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.21px;&quot;&gt;angular-dual-listbox to work in your project import it to your root module as shown below.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;import { BrowserModule } from &#39;@angular/platform-browser&#39;; import { NgModule } from &#39;@angular/core&#39;; import { AngularDualListBoxModule } from &#39;angular-dual-listbox&#39;; .... @NgModule({     imports: [ AngularDualListBoxModule ],     ... }) export class AppModule {}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Next, For the code to work you does not need any extra node modules , except for one this is used to implement bootstrap functionality in Angular. we are using ngx-bootstrap here to implement bootstrap, if already installed head for the next step, if not first install the ngx-bootstrap by executing the below given code in your cli.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot; /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;npm install ngx-bootstrap --save&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot; /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;this will install the above node module into your project and you should also include bootstrap css into your index.html to include bootsrap style to your project.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7b7b7b; font-family: sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(247, 247, 247); border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 16px; letter-spacing: 0.015em; margin-bottom: 24px; overflow-x: auto; padding: 13px 15px;&quot;&gt;&lt;code style=&quot;background: rgb(238, 238, 238); border-radius: 2px; box-sizing: border-box; font-family: &amp;quot;Fira Mono&amp;quot;, &amp;quot;Andale Mono&amp;quot;, Consolas, monospace; font-size: 1rem; font-variant-ligatures: none; letter-spacing: 0px; line-height: 24px; padding: 0px;&quot;&gt;&amp;lt;!--- index.html --&amp;gt;&lt;br /&gt;&amp;lt;link href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;u style=&quot;box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;Implementation:&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;u style=&quot;box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Create a new component for the code implementation lets name it duallistbox. execute the below given code in your cli to create the component in your project.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ng generate component duallistbox &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;since our component is created, lets open duallistbox.component.ts file, copy and paste the below given code to your file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;  @Component({ &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;selector: &#39;app-duallistbox&#39;, &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;templateUrl: &#39;./duallistbox.component.html&#39;, &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;styleUrls: [&#39;./duallistbox.component.css&#39;] &lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;}) export class DuallistboxComponent implements OnInit { &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;target = []; &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;source: any = []; &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;constructor() {  &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.source = [ &#39;Gowriter&#39;, &#39;Angular&#39;, &#39;Angular JS&#39;, &#39;Program&#39;, &#39;Multi Select&#39;, &#39;Dual Listbox&#39; ]; &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;} &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ngOnInit() {}  }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;Next for the html part, open&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;duallistbox.html copy and paste the below given html code.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;container&quot;&amp;gt; &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;dual-list [source]=&quot;source&quot; [(destination)]=&quot;target&quot; height=&quot;150px&quot;&amp;gt;&amp;lt;/dual-list&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;that&#39;s it save your code and refresh your project, now you should see multi select ui working on your angular project. all you need to do is just replace the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.source &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;array with your own data.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/4642424536032264739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=4642424536032264739&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4642424536032264739'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4642424536032264739'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/02/how-to-implement-angular-dual-listbox.html' title='How to implement angular-dual-listbox in Angular Project'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-1ojCzXJLfw0/XGJutTHH-jI/AAAAAAAABAM/yVy4V2nRhQEFOEEcQgZv1omBO6ddx992ACLcBGAs/s72-c/mult%2Bimg.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-3823921755987603803</id><published>2019-02-09T02:48:00.002-08:00</published><updated>2019-02-11T23:06:49.664-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular 2"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular 5"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="move items"/><title type='text'>Angular : Move items from one list to another list</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In this post we are going to see on how to select items from one list and move them to another list in angular. you can select a single item or multiple items from the one of the lists and can move them to other, vice versa.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-MmpgsL2Cm6Y/XF6mWeg2NuI/AAAAAAAAA_Y/Te9qDCojWRYuaKOBAueYXwCWMUlCki2_gCLcBGAs/s1600/select.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;159&quot; data-original-width=&quot;816&quot; height=&quot;123&quot; src=&quot;https://1.bp.blogspot.com/-MmpgsL2Cm6Y/XF6mWeg2NuI/AAAAAAAAA_Y/Te9qDCojWRYuaKOBAueYXwCWMUlCki2_gCLcBGAs/s640/select.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For the code to work you does not need any extra node modules , but for one which is used to implement bootstrap functionality in Angular. we are using ngx-bootstrap here to implement bootstrap here so if already have it in your project head for the next step, if not first install the ngx-bootstrap by executing the below given code in your cli.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;npm install ngx-bootstrap --save&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;this will install the above node module into your project. and lastly you should include bootstrap css into your index.html to include bootsrap style to your projects.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre style=&quot;background: rgb(247, 247, 247); border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 16px; letter-spacing: 0.015em; margin-bottom: 24px; overflow-x: auto; padding: 13px 15px;&quot;&gt;&lt;code style=&quot;background: rgb(238, 238, 238); border-radius: 2px; box-sizing: border-box; font-family: &amp;quot;Fira Mono&amp;quot;, &amp;quot;Andale Mono&amp;quot;, Consolas, monospace; font-size: 1rem; font-variant-ligatures: none; letter-spacing: 0px; line-height: 24px; padding: 0px;&quot;&gt;&amp;lt;!--- index.html --&amp;gt;&lt;br /&gt;&amp;lt;link href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;so next create a new component for the code implementation.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now open your newly created components html file. copy and paste the following code into your file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot;, courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;form-group row&quot;&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;col-md-3&quot;&amp;gt;  &amp;lt;select  class=&quot;form-control&quot; [&lt;/span&gt;(&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ngModel&lt;/span&gt;)&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;]=&quot;selectedToAdd&quot; multiple name=&quot;myselecttsms2&quot;&amp;gt;   &amp;lt;option *ngFor=&quot;let item of groupsArray&quot; style=&quot;text-align: center;border-radius: 2px;background: #fff;margin-bottom: 2px;padding: 2px;&quot; [ngValue]=&quot;item&quot;&amp;gt;{{item.groupName}}&amp;lt;/option&amp;gt;  &amp;lt;/select&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;col-md-1&quot; style=&quot;margin-top: 35px;&quot;&amp;gt;  &amp;lt;div class=&quot;row&quot;&amp;gt;   &amp;lt;div class=&quot;col-12&quot; style=&quot;margin-left: 29px;margin-top: -24px;&quot;&amp;gt;    &amp;lt;button (click)=&quot;assign&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;()&quot; class=&quot;btn  btn-primary&quot; style=&quot;margin-bottom: 3px;width: 39px;height: 39px;background: #24ca71;&quot;&amp;gt;&amp;lt;i class=&quot;fa fa-angle-double-right&quot;&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/button&amp;gt;   &amp;lt;/div&amp;gt;  &amp;lt;/div&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;row&quot;&amp;gt;   &amp;lt;div class=&quot;col-12&quot; style=&quot;margin-left: 27px;&quot;&amp;gt;    &amp;lt;button (click)=&quot;unassig&lt;/span&gt;n&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;()&quot; class=&quot;btn  btn-primary&quot; style=&quot;margin-bottom: 3px;width: 39px;height: 39px;background: #24ca71;&quot;&amp;gt;&amp;lt;i class=&quot;fa fa-angle-double-left&quot;&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/button&amp;gt;   &amp;lt;/div&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div class=&quot;col-md-3&quot;&amp;gt;  &amp;lt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;class=&quot;form-control&quot; [&lt;/span&gt;(&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ngModel&lt;/span&gt;)&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;]=&quot;selectedToRemove&quot; multiple name=&quot;myselecttsms&quot;&amp;gt;   &amp;lt;option *ngFor=&quot;let item of selectedItems&quot; style=&quot;text-align: center;border-radius: 2px;background: #fff;margin-bottom: 2px;padding: 2px;&quot; [ngValue]=&quot;item&quot;&amp;gt;{{item.groupName}}&amp;lt;/option&amp;gt;  &amp;lt;/select&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;as you can see the above code uses&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot;, courier, monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ngFor &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;to loop the json data and we also have&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot;, courier, monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;multiple &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;attribute in select tag which tells it to allow multiple select in the list. when ever an option is selected its data is saved to&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot;, courier, monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;selectedToRemove &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;via ngModel.&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now, lets go to&amp;nbsp; ts part. open your components ts file copy and paste the below give code into your ts file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; overflow: scroll; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #444444; font-family: courier new, courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;  @Component({ &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;selector: &#39;app-selectcomp&#39;, &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;  templateUrl: &#39;./selectcomp.component.html&#39;, &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;styleUrls: [&#39;./selectcomp.component.css&#39;] &lt;/span&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;}) export class SelectcompComponent implements OnInit { &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;selectedToAdd: any; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;selectedToRemove: any; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;selectedItems: any = []; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;groupsArray: any = []; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;constructor() { &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;this.groupsArray = [{&#39;groupName&#39;:&#39;ramu&#39;}, &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;{&#39;groupName&#39;:&#39;ravi&#39;}, &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;{&#39;groupName&#39;:&#39;teja&#39;}, &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;{&#39;groupName&#39;:&#39;murali&#39;}] &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;}  &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;ngOnInit() { &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;}  &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;assign&lt;/span&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;() {   this.selectedItems = this.selectedItems.concat(this.selectedToAdd);   this.groupsArray = this.groupsArray.filter(selectedData =&amp;gt; {   return this.selectedItems.indexOf(selectedData) &amp;lt; 0;   });   this.selectedToAdd = []; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;} &lt;/span&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;unassign&lt;/span&gt;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;() {   this.groupsArray = this.groupsArray.concat(this.selectedToRemove);   this.selectedItems = this.selectedItems.filter(selectedData =&amp;gt; {  &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;return this.groupsArray.indexOf(selectedData) &amp;lt; 0;   });   this.selectedToRemove = []; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: 14px; white-space: pre;&quot;&gt;} }&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;here we are concatenating the selected items with the other list and removing the selected from the original list via the filter method.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That&#39;s it if you have any queries feel free to comment below.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/3823921755987603803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=3823921755987603803&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/3823921755987603803'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/3823921755987603803'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/02/angular-move-items-from-one-list-to.html' title='Angular : Move items from one list to another list'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-MmpgsL2Cm6Y/XF6mWeg2NuI/AAAAAAAAA_Y/Te9qDCojWRYuaKOBAueYXwCWMUlCki2_gCLcBGAs/s72-c/select.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-4614462492977182762</id><published>2019-02-06T05:23:00.005-08:00</published><updated>2019-02-06T20:23:11.278-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="angular"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular 2"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular 5"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular Tabs"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamic Tabs"/><category scheme="http://www.blogger.com/atom/ns#" term="Tabs in Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="Tabs system in Angular"/><title type='text'>How to Implement Dynamic Tabs in Angular Project </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In this post we are going to see how to Implement Tabs in Angular project. we are using two components here to implement this example one is tabscomp and other is&amp;nbsp;ckeditorcomp. here tabscomp is used to implement tabs and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ckeditorcomp is used within the tabs.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Here to implement tabs in angular we are going to use&amp;nbsp;ngx-boostrap which is a node module to implement certain bootstrap ui in angular. so first install&amp;nbsp;ngx-boostrap into your project.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;npm install ngx-bootstrap --save&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;after installation of the above module we need bootstrap css file for styling. add the following css file to index.html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(247, 247, 247); border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; font-size: 16px; margin-bottom: 24px; overflow-x: auto; padding: 13px 15px;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; box-sizing: border-box; font-family: &amp;quot;Fira Mono&amp;quot;, &amp;quot;Andale Mono&amp;quot;, Consolas, monospace; font-size: 1rem; font-variant-ligatures: none; letter-spacing: 0px; line-height: 24px; padding: 0px;&quot;&gt;&amp;lt;!--- index.html --&amp;gt;&lt;br /&gt;&amp;lt;link href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;for the node module to work we should import it to root module. so first import the module as given below. in my case i&#39;m importing it in app.module.ts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import { TabsModule } from &#39;ngx-bootstrap&#39;;&lt;br /&gt;&lt;br /&gt;@NgModule({ &lt;br /&gt;... &lt;br /&gt;imports: [TooltipModule.forRoot(),...] &lt;br /&gt;... &lt;br /&gt;})&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Next create two component as explained above. execute the below given code in your cli to create components.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ng generate component &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;tabscomp&lt;br /&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ng generate component &lt;/span&gt;&lt;/span&gt;ckeditorcomp&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now open tabscomp.html file, copy and paste the below given code and refresh your project.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;h4&amp;gt;Normal Tabs(static)&amp;lt;/h4&amp;gt; &amp;lt;div&amp;gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;tabset&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;tab heading=&quot;Basic title&quot; id=&quot;tab1&quot;&amp;gt;Basic content&amp;lt;/tab&amp;gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;tab heading=&quot;Basic Title 1&quot;&amp;gt;Basic content 1&amp;lt;/tab&amp;gt;      &amp;lt;tab heading=&quot;Basic Title 2&quot;&amp;gt;Basic content 2&amp;lt;/tab&amp;gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/tabset&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;you should see page with tabs as shown below. this does not need any ts code to work.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-lGIpdmDVE24/XFrWwQR5j3I/AAAAAAAAA-g/-afaR0l5ebQXSP2neyC6eofYB1aUhLKfQCLcBGAs/s1600/normal.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;137&quot; data-original-width=&quot;1345&quot; height=&quot;64&quot; src=&quot;https://4.bp.blogspot.com/-lGIpdmDVE24/XFrWwQR5j3I/AAAAAAAAA-g/-afaR0l5ebQXSP2neyC6eofYB1aUhLKfQCLcBGAs/s640/normal.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;next we will implement dynamic tabs, copy and paste the below code to your&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;tabscomp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;.html file just below the recently added code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;h4&amp;gt;Dynamic Tabs&amp;lt;/h4&amp;gt; &amp;lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-sm&quot; (click)=&quot;newTab()&quot;&amp;gt;   Add new tab &amp;lt;/button&amp;gt;   &amp;lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-sm&quot;  style=&quot;margin-left:5px;&quot;(click)=&quot;tabs = []&quot;  *ngIf=&quot;tabs.length&quot;&amp;gt;   Remove all tabs &amp;lt;/button&amp;gt;  &amp;lt;tabset style=&quot;margin-top: 7px;s&quot;&amp;gt;  &amp;lt;tab heading=&quot;Static title&quot;&amp;gt;Static content&amp;lt;/tab&amp;gt;   &amp;lt;tab *ngFor=&quot;let tabz of tabs&quot;  [heading]=&quot;tabz.title&quot;  [active]=&quot;tabz.active&quot;  (select)=&quot;tabz.active = true&quot;  (deselect)=&quot;tabz.active = false&quot;  [disabled]=&quot;tabz.disabled&quot;  [removable]=&quot;tabz.removable&quot;  (removed)=&quot;removeTabHandler(tabz)&quot;  [customClass]=&quot;tabz.customClass&quot;&amp;gt;  {{tabz?.content}}   &amp;lt;/tab&amp;gt; &amp;lt;/tabset&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-alENs-ipgwA/XFrffxuURRI/AAAAAAAAA-8/sHZyhvPv-Rc2TJO5rMIHoqg2aTWhKvZYgCLcBGAs/s1600/dynamic.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;211&quot; data-original-width=&quot;1351&quot; height=&quot;94&quot; src=&quot;https://4.bp.blogspot.com/-alENs-ipgwA/XFrffxuURRI/AAAAAAAAA-8/sHZyhvPv-Rc2TJO5rMIHoqg2aTWhKvZYgCLcBGAs/s640/dynamic.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;as you can see the above code contains *ngFor which takes array from ts to loop the code in html file. it also contains various others like&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;[heading]&lt;/span&gt;,&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;[active]&lt;/span&gt;&amp;nbsp;,&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;(select)&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;(deselect)&lt;/span&gt;,&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;[disabled]&lt;/span&gt;&amp;nbsp;,&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;[removable]&lt;/span&gt;,&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;(removed)&lt;/span&gt;,&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;[customClass]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;etc.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Heading directive is used to display the given heading&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;active takes boolean as its value when true the given tab will be in active state.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;select is called when the user selects a tab.&amp;nbsp;&#39;tabz.active = true&#39; is executed when one of the tabs is selected.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;deselect is called when the tab is out of focus.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&#39;tabz.active = false&#39; is executed when one of the tab gets out of focus.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;disabled takes boolean as value. by default it will be false, when true is set the tab will still be visible buy use cannot interact with it.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;removable also takes boolean as value. when set to true the tab can be removed from the array of tabs listed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;removed is called when user tries to delete the tab. here we will be calling a function when the tab is selected for deletion.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;we can add styling to the individual tabs with customClass directive.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;next copy and paste the following code to your&amp;nbsp;tabscomp.component.ts file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.tabs = [ &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;{ title: &#39;new Tab 1&#39;, content: &#39;new Tab content 1&#39; removable: true}, &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;{ title: &#39;new Tab Title 2&#39;, content: &#39;new Tab content 2&#39; removable: true }, &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;{ title: &#39;new Tab Title 3&#39;, content: &#39;new Tab content 3&#39;, removable: true } ]; &lt;/span&gt;n&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ewTab(){ &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;const newTabIndex = this.tabs.length + 1; &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.tabs.push({  title: `new Tab Title ${newTabIndex}`,                  content: `new Tab content ${newTabIndex}`,  disabled: false,  removable: true  }); }   removeTabHandler(tab){ &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.tabs.splice(this.tabs.indexOf(tab), 1);    console.log(&#39;Tab removed&#39;); }               &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Here tabs array contains all the tabs that we need to be displayed on our page. we can add title, content, removable, active, disabled stc to customize the tabs.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;newTab() method is used to add new tabs to the existing tabs, it should also include the details like title, content etc.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;removeTabHandler() method removes particular tab from the tabs array.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Below code is about adding components inside tabs other than plain text.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;copy and paste the below given code to your appcomp.html file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;h4&amp;gt;Add components with Dynamic Tabs&amp;lt;/h4&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-sm&quot; (click)=&quot;newTabcomp()&quot;&amp;gt;       Add new tab &lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/button&amp;gt;   &amp;lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-sm&quot;  style=&quot;margin-left:5px;&quot;(click)=&quot;tabs1 = []&quot;  *ngIf=&quot;tabs.length&quot;&amp;gt;       Remove all tabs &amp;lt;/button&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt; &amp;lt;tabset style=&quot;margin-top: 7px;s&quot;&amp;gt;     &amp;lt;tab heading=&quot;Static title&quot;&amp;gt;Static content&amp;lt;/tab&amp;gt;     &amp;lt;tab *ngFor=&quot;let tabz of tabs1&quot;          [heading]=&quot;tabz.title&quot;          [active]=&quot;tabz.active&quot;          (select)=&quot;tabz.active = true&quot;          (deselect)=&quot;tabz.active = false&quot;          [disabled]=&quot;tabz.disabled&quot;          [removable]=&quot;tabz.removable&quot;          (removed)=&quot;removeTabHandler1(tabz)&quot;          [customClass]=&quot;tabz.customClass&quot;&amp;gt;   &amp;lt;div [ngSwitch]=&quot;tabz?.content&quot;&amp;gt;         &lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;app-ckeditorcomp *ngSwitchCase=&quot;&#39;testcomp&#39;&quot;&amp;gt;&amp;lt;/app-ckeditorcomp&amp;gt;       &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt;     &amp;lt;/tab&amp;gt; &amp;lt;/tabset&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;as you can see the difference from the above code is addition of the below given code. rest of the code is similar to code which we have seen earlier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div [ngSwitch]=&quot;tabz?.content&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;app-ckeditorcomp *ngSwitchCase=&quot;&#39;testcomp&#39;&quot;&amp;gt;&amp;lt;/app-ckeditorcomp&amp;gt; &lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;[ngSwitch] &lt;span style=&quot;background-color: #fafafa; letter-spacing: 0.3px;&quot;&gt;directive on a container specifies an expression to match against. The expressions to match are provided by&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #fafafa; letter-spacing: 0.3px;&quot;&gt;&lt;span style=&quot;cursor: pointer; font-weight: inherit; letter-spacing: 0.3px; line-height: 24px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ngSwitchCase&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #fafafa; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp;directives on views within the container.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.3px;&quot;&gt;Every view that matches is rendered.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.3px;&quot;&gt;Here we are giving the ngSwitchCase as &#39;testcomp&#39;&amp;nbsp; to app-ckeditorcomp. if [ngSwitch] gets testcomp the it will display ckeditorcomp component.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-iM2nqSjGw38/XFrfSwd9BWI/AAAAAAAAA-4/rA6Hg3ELG4AiuIUllSVsz8tqgi11vxbiwCLcBGAs/s1600/tabs%2Bwith%2Bcomponent%2Bbased.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;461&quot; data-original-width=&quot;1325&quot; height=&quot;222&quot; src=&quot;https://4.bp.blogspot.com/-iM2nqSjGw38/XFrfSwd9BWI/AAAAAAAAA-4/rA6Hg3ELG4AiuIUllSVsz8tqgi11vxbiwCLcBGAs/s640/tabs%2Bwith%2Bcomponent%2Bbased.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Incase if you are thinking what is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.3px;&quot;&gt;ckeditorcomp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; doing here, i&#39;ve made a post regarding &lt;a href=&quot;https://www.gowriter.in/2019/01/how-to-implement-ckeditor-in-angular.html&quot; target=&quot;_blank&quot;&gt;CKEditor &lt;/a&gt;, do check it out.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Next you can copy and paste the below given ts code to you appcomp.ts file. here the only difference is we will be giving a static text to content which is also given to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.3px;&quot;&gt;ngSwitchCase&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; of component tag which is to be displayed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;background-color: white; border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;  @Component({ &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;selector: &#39;app-tabscomp&#39;, &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;templateUrl: &#39;./tabscomp.component.html&#39;, &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;styleUrls: [&#39;./tabscomp.component.css&#39;] }) export class TabscompComponent implements OnInit { &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;tabs: any = []; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;tabs1: any = []; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;newTabIndex: any; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;constructor() {   this.tabs1 = [  { title: &#39;new Tab 1&#39;, content: &#39;new Tab content 1&#39; removable: true},  ]; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;} &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;ngOnInit() {}     &lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;newTabcomp(){  const newTabIndex = this.tabs.length + 1;  this.tabs1.push({  &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;title: `new Tab Title ${newTabIndex}`,   &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;content: `testcomp`, &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;disabled: false,  &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;removable: true,  }); &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;}      &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;removeTabHandler1(tab){  this.tabs1.splice(this.tabs.indexOf(tab), 1);   console.log(&#39;Remove Tab handler&#39;);                        &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;} }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;That&#39;s it, please feel free to comment if you have any doubts or if the code does not work.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/4614462492977182762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=4614462492977182762&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4614462492977182762'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4614462492977182762'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/02/how-to-implement-dynamic-tabs-in.html' title='How to Implement Dynamic Tabs in Angular Project '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-lGIpdmDVE24/XFrWwQR5j3I/AAAAAAAAA-g/-afaR0l5ebQXSP2neyC6eofYB1aUhLKfQCLcBGAs/s72-c/normal.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-5825274237996057280</id><published>2019-02-05T04:19:00.002-08:00</published><updated>2019-02-06T20:25:32.685-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="@Input"/><category scheme="http://www.blogger.com/atom/ns#" term="@output"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular Decorators"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular EventEmitters"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular Input Decorator"/><category scheme="http://www.blogger.com/atom/ns#" term="angular js"/><category scheme="http://www.blogger.com/atom/ns#" term="Angular Output Decorator"/><category scheme="http://www.blogger.com/atom/ns#" term="eventemitter"/><category scheme="http://www.blogger.com/atom/ns#" term="events"/><title type='text'>How to Pass data Between Angular components with @Input and @output  decorators.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Input and Output decorators in Angular are used to exchange data between components. They are a mechanism to send or receive data from one component to another.&amp;nbsp;Input is used to receive data in to the component whereas Output is used to send data out of the component. In this post we are going to see on how to send and receive data between components in Angular using Input &amp;amp; Output decorators.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;u style=&quot;background-color: white; box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;Components:&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;First create two components in your angular project so that we can use them to transfer data.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;for my convenience i have created two components with names as firstcomp and secondcomp. this will create two folders in src folder of your project.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;After creating the above two components navigate to app.module.ts and modify it as given below so that it include the two components imports.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;Now open app.component.ts in your src folder and modify it as follows.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 1em; letter-spacing: 0.21px;&quot;&gt;import { BrowserModule } from &#39;@angular/platform-browser&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import { NgModule } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import { AppComponent } from &#39;./app.component&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import { FirstcompComponent } from &#39;./firstcomp/firstcomp.component&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;import { SecondcompComponent } from &#39;./secondcomp/secondcomp.component&#39;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;@NgModule({&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;declarations: [&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;AppComponent,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;FirstcompComponent,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;SecondcompComponent&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;],&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;imports: [&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BrowserModule&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;],&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;providers: [],&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;bootstrap: [AppComponent]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;export class AppModule { }&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;as you can see i had included two methods &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;buttonMessage &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;and &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;button1Message &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;in the parent component. now copy and paste the below given html code to your app.html file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div&amp;gt;  &amp;lt;h2&amp;gt;Data Transfer between first component to second component&amp;lt;/h2&amp;gt;  &amp;lt;div class=&quot;row&quot;&amp;gt;   &amp;lt;div class=&quot;col-6&quot;&amp;gt;     &amp;lt;app-firstcomp (emitEvent)=&quot;buttonMessage($event)&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;       [message]=&quot;messageFromButton1&quot;&amp;gt;&amp;lt;/app-firstcomp&amp;gt;   &amp;lt;/div&amp;gt;   &amp;lt;div class=&quot;col-6&quot;&amp;gt;     &amp;lt;app-secondcomp (emitEvent)=&quot;button1Message($event)&quot; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;       [message]=&quot;messageFromButton&quot;&amp;gt;&amp;lt;/app-secondcomp&amp;gt;   &amp;lt;/div&amp;gt;  &amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The above html consists of &#39;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;app-firstcomp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&#39; tag and &#39;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;app-secondcomp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&#39; tag making them child components and app.component as parent component.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The&amp;nbsp;&lt;span style=&quot;color: orange; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;courier new&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: orange; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;courier new&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;emitEvent&lt;/span&gt;&lt;span style=&quot;color: orange; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;courier new&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;attribute in child tags fetches data emitted from&amp;nbsp; firstcomp/secondcomp component and sends it to the specified method we have given&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;buttonMessage(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;$event&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;method. here &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$event&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; is the data we got from child component to parent component when it emits data.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;span style=&quot;color: orange;&quot;&gt;[message]&lt;/span&gt;&lt;span style=&quot;color: orange; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;courier new&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;attribute in child tags fetches data from&amp;nbsp; parent component (app.component) and sends it to the specified tags child component in this case&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;firstcomp/secondcomp.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;open firstcomp.html copy and paste below given code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div&amp;gt;  &amp;lt;p&amp;gt;First component&amp;lt;/p&amp;gt;  &amp;lt;button (click)=&quot;clickMe()&quot;&amp;gt;Button&amp;lt;/button&amp;gt;  &amp;lt;h4&amp;gt;{{message}}&amp;lt;/h4&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;now lets get to the functionality part. copy and paste the below given code to firstcomp.component.ts file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;import { Component, OnInit, Output, Input, EventEmitter } from &#39;@angular/core&#39;;  @Component({   selector: &#39;app-firstcomp&#39;,   templateUrl: &#39;./firstcomp.component.html&#39;,   styleUrls: [&#39;./firstcomp.component.css&#39;] }) export class FirstcompComponent implements OnInit {       @Output()    emitEvent = new EventEmitter();      @Input()   message:string;   constructor() { }    ngOnInit() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;  clickMe(){     this.emitEvent.emit(&#39;message from first component&#39;);   } }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;open secondcomp.html copy and paste below given code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&amp;lt;div&amp;gt;  &amp;lt;p&amp;gt;Second component&amp;lt;/p&amp;gt;  &amp;lt;button (click)=&quot;clickMe()&quot;&amp;gt;Button1&amp;lt;/button&amp;gt;  &amp;lt;h4&amp;gt;{{message}}&amp;lt;/h4&amp;gt; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;now, copy and paste the below given code to second.comp.component.ts file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #7b7b7b; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;overflow: scroll;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;import { Component, OnInit, Input, Output, EventEmitter } from &#39;@angular/core&#39;;  @Component({   selector: &#39;app-secondcomp&#39;,   templateUrl: &#39;./secondcomp.component.html&#39;,   styleUrls: [&#39;./secondcomp.component.css&#39;] }) export class SecondcompComponent implements OnInit {   @Input()   message:string;      @Output()    emitEvent = new EventEmitter();   constructor() { }    ngOnInit() {}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;  clickMe(){     this.emitEvent.emit(&#39;message from second component&#39;);   } }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;u style=&quot;background-color: white; box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;Explanation:&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;background-color: white; box-sizing: border-box; color: orange; font-family: ultra, sans-serif; font-size: 25px; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;As you can see the two comonents tags will display their respective ui on the parent component. on the firstcomp and secondcomp we have buttons which when clicked calls &#39;clickMe()&#39; method when executed the method using&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;this.emitEvent.emit() &lt;/span&gt;emits a message in our case we are using a static string &#39;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;message from second component&lt;/span&gt;&#39; .&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;here in ts file you can see that&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;message&lt;/span&gt;&amp;nbsp;is declared with @Input&amp;nbsp; decorator and&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;emitEvent &lt;/span&gt;with @Output decorator, so that when a message is emitted from other component the message variable will get the data and using&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;emitEvent &lt;/span&gt;component one can emit data to other component.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;that&#39;s it save and run your project when your click one of the buttons on the page the message will be displayed on other component. In our case&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&#39;message from second component&#39;&lt;/span&gt;if&amp;nbsp; Button1 is clicked and&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-size: 14px; letter-spacing: 0.21px; white-space: pre;&quot;&gt;&#39;message from first component&#39; &lt;/span&gt;if Button is clicked&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/5825274237996057280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=5825274237996057280&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5825274237996057280'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5825274237996057280'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/02/how-to-pass-data-between-angular.html' title='How to Pass data Between Angular components with @Input and @output  decorators.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-4353974698342083384</id><published>2019-02-04T05:03:00.002-08:00</published><updated>2019-02-04T05:03:54.450-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="angular"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="angular js"/><category scheme="http://www.blogger.com/atom/ns#" term="angular wordcloud"/><category scheme="http://www.blogger.com/atom/ns#" term="word cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="word cloud implementation in angular"/><category scheme="http://www.blogger.com/atom/ns#" term="Word Cloud in Angular"/><title type='text'>How to Implement Word Cloud in Angular Project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Word Cloud is an SVG image composed of words from a particular text or subject, in which the size of each word indicates its frequency/importance.Word Cloud consists of Tags which are usually single words, and the importance of each tag/word is shown with font size or color.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-bgVQRKr_aXc/XFgqdfEuQmI/AAAAAAAAA-E/W2wv_oaoKuMIGMEmzFmyQ3hrdR-y-SkTwCLcBGAs/s1600/wordCloud%2Bimage.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;411&quot; data-original-width=&quot;940&quot; height=&quot;276&quot; src=&quot;https://1.bp.blogspot.com/-bgVQRKr_aXc/XFgqdfEuQmI/AAAAAAAAA-E/W2wv_oaoKuMIGMEmzFmyQ3hrdR-y-SkTwCLcBGAs/s640/wordCloud%2Bimage.JPG&quot; style=&quot;box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px; text-align: center;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: ultra, sans-serif; font-size: 25px; font-weight: normal; line-height: 25px; margin: 0.5em 0px;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;u&gt;Installation:&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;First install angular4-word-cloud, in to your project with the following command&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;font-family: gotham, helvetica, sans-serif; font-size: 14px; color: #ff6600;&quot; style=&quot;box-sizing: border-box; color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;npm install angular4-word-cloud --save&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After the above node module is installed, also install the d3 node module. it is required for the above module to work as it is based on d3 architecture.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;font-family: gotham, helvetica, sans-serif; font-size: 14px; color: #ff6600;&quot; style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;&lt;b style=&quot;color: #ff6600;&quot;&gt;npm install&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #ff6600;&quot;&gt;&lt;b&gt;d3 --save&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;and to the next step, d3 also requires to include its cloud file into the index file of the angular project. so include the following js file into your index file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #ff6600; font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;&amp;lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/d3-cloud/1.2.4/d3.layout.cloud.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: orange; font-family: ultra, sans-serif; font-size: 25px;&quot;&gt;&lt;u&gt;Imports&lt;/u&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Every node module needs an import to get it working, so import the following to your root angular file in my case app.module.ts.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; if you have module.ts for your component you can also import it to your components module also.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #ff6600; font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;import {AgWordCloudModule, AgWordCloudData} from &#39;angular4-word-cloud&#39;;&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;and also include it to your&amp;nbsp;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;() as given below.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #ff6600; font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;imports: [AgWordCloudModule.forRoot()],&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After importing the above code your app.module.ts file should look as follows.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;import {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;import {AgWordCloudModule, AgWordCloudData} from &#39;angular4-word-cloud&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot; /&gt;&lt;/span&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;box-sizing: border-box; color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import&amp;nbsp;{ CloudComponent&amp;nbsp;}&amp;nbsp;from&amp;nbsp;&#39;./cloud/cloud.component&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px;&quot; /&gt;&lt;/span&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;({&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;declarations:&lt;/span&gt;&amp;nbsp;[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ff6600; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CloudComponent&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;imports:&lt;/span&gt;&amp;nbsp;[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;AgWordCloudModule.forRoot()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;providers:&lt;/span&gt;&amp;nbsp;[],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;bootstrap:&lt;/span&gt;&amp;nbsp;[&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;export&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppModule&lt;/span&gt;&amp;nbsp;{ }&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;As you can see i also imported my component into the root module, ie app.module.ts file. that&#39;s it for the import part now lets get to the coding part shall we.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: orange; font-family: ultra, sans-serif; font-size: 25px;&quot;&gt;&lt;u&gt;Implementation&lt;/u&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;first open cloud.html file copy and paste the following code.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;lt;div AgWordCloud [wordData]=&quot;wordData&quot; [options]=&quot;options&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now open cloud.component.ts copy and paste the below give n code.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; font-family: gotham, helvetica, arial, sans-serif; font-size: 1em; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #444444; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;@Component({&lt;/span&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selector: &#39;app-wordcloud&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; templateUrl: &#39;./wordcloud.component.html&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; styleUrls: [&#39;./wordcloud.component.css&#39;]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export class WordcloudComponent implements OnInit {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; wordData: any = [];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; options: any = {};&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; this.wordData = [&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 1000, text: &#39;GoWriter&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 950, text: &#39;Angular&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 123, text: &#39;JAva script&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 321, text: &#39;ngServe&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 231, text: &#39;Int&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 123, text: &#39;CkEditor&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 346, text: &#39;Ng Model&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 107, text: &#39;Variable&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 436, text: &#39;Class&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 731, text: &#39;NgOnInit&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 80, text: &#39;@Input&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 96, text: &#39;@Output&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 531, text: &#39;EventEmitter&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 109, text: &#39;ChangeDetection&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 500, text: &#39;Directives&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 213, text: &#39;Services&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 294, text: &#39;Component&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 472, text: &#39;NgViewAfterInIt&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 297, text: &#39;NgOnChanges&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 456, text: &#39;NgBind&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 123, text: &#39;NgTest&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 376, text: &#39;Pipes&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 93, text: &#39;Implements&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {size: 123, text: &#39;Assets&#39;},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; ];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; this.options = {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; settings: {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; minFontSize: 10,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maxFontSize: 100,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; margin: {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top: 10,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right: 10,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bottom: 10,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left: 10&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; labels: true // false to hide hover labels&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; ngOnInit() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; letter-spacing: normal;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;save the file and refresh your project to see if the word cloud is visible. if everything is perfect you word cloud should be visible to you. if you have encountered any errors or for some reasons word cloud is not working feel free to post a comment, ill respond as soon as possible.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;border: 0px; box-sizing: border-box; font-family: Montserrat, sans-serif; letter-spacing: 0.02em; line-height: 1.57143em; margin: 0px; padding: 0px; position: relative;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;color: orange; font-size: small;&quot;&gt;&lt;u&gt;Tips :&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; font-family: sans-serif; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;ul style=&quot;box-sizing: border-box; line-height: 1.2; list-style-image: initial; list-style-position: initial; margin: 0px 0px 10px; padding: 0px 30px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; letter-spacing: 0.02em; margin: 0px; padding: 0.25em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: arial, helvetica, sans-serif;&quot;&gt;&amp;nbsp;In case any error appears, please do check imported modules(root components) and also js import in index&amp;nbsp; file.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; font-size: 15px; letter-spacing: 0.02em; margin: 0px; padding: 0.25em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: arial, helvetica, sans-serif;&quot;&gt;&amp;nbsp; If Case if you are getting the following error &quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-family: arial, helvetica, sans-serif;&quot;&gt;Can&#39;t bind to &#39;ngModel&#39; since it isn&#39;t a known property &quot;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;, Please import common module along with form module.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/4353974698342083384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=4353974698342083384&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4353974698342083384'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4353974698342083384'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/02/how-to-implement-word-cloud-in-angular.html' title='How to Implement Word Cloud in Angular Project'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-bgVQRKr_aXc/XFgqdfEuQmI/AAAAAAAAA-E/W2wv_oaoKuMIGMEmzFmyQ3hrdR-y-SkTwCLcBGAs/s72-c/wordCloud%2Bimage.JPG" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-6630062337659913600</id><published>2019-01-31T08:54:00.002-08:00</published><updated>2019-01-31T08:54:07.958-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="angular"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 6"/><category scheme="http://www.blogger.com/atom/ns#" term="ckeditor"/><category scheme="http://www.blogger.com/atom/ns#" term="gowriter"/><category scheme="http://www.blogger.com/atom/ns#" term="js"/><category scheme="http://www.blogger.com/atom/ns#" term="ng2-ckeditor"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><category scheme="http://www.blogger.com/atom/ns#" term="typescript"/><title type='text'>How to Implement ckeditor in Angular</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Have you ever come across situation, where you need to implement an editor in your Angular project !. In this post We are going to implement ng2-ckeditor in our Angular Project, so lets get started.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-As7ijkEo7Kc/XFMm1nO9pcI/AAAAAAAAA9s/oQjEnBcYwR4cLsBSR2knQ4kahMUlu3t5wCLcBGAs/s1600/ekEditor%2Bimage.JPG&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px; margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;410&quot; data-original-width=&quot;755&quot; height=&quot;345&quot; src=&quot;https://4.bp.blogspot.com/-As7ijkEo7Kc/XFMm1nO9pcI/AAAAAAAAA9s/oQjEnBcYwR4cLsBSR2knQ4kahMUlu3t5wCLcBGAs/s640/ekEditor%2Bimage.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;ng2-ckeditor&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #383838; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;first, lets create a project in angular. i had already created a project so, i&#39;m going to use that. if you are interested or new to Angular Project creation you can check the post&amp;nbsp;&lt;/span&gt;&lt;a data-mce-href=&quot;http://www.gowriter.in&quot; href=&quot;http://www.gowriter.in/&quot; shape=&quot;rect&quot; style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #047ac6; cursor: pointer; letter-spacing: 0.02em; line-height: 1.57143em; margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.3s ease 0s;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;on how to create project in Angular&lt;span style=&quot;background-color: white; letter-spacing: 0.21px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #383838; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #383838; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now to use ng2-ckeditor in our angular project we have to first install the module into our project. to do so copy and paste the below given line f code to your command prompt and execute the command.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;font-family: gotham, helvetica, sans-serif; font-size: 14px; color: #ff6600;&quot; style=&quot;box-sizing: border-box; color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;npm install ng2-ckeditor--save&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;this will install the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;ng2-ckeditor&lt;/span&gt;&amp;nbsp;&lt;/span&gt;module to our angular project. now since the installation of module is done,&amp;nbsp;lets get to implementation of&amp;nbsp;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;ng2-ckeditor&lt;/span&gt;&amp;nbsp;in our angular project.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; It is also mandatory to include the CKEditor java script file in your index,html file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;pre style=&quot;background: rgb(247, 247, 247); border-radius: 2px; box-sizing: border-box; letter-spacing: normal; margin-bottom: 24px; overflow-x: auto; padding: 13px 15px;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; box-sizing: border-box; font-variant-ligatures: none; letter-spacing: 0px; line-height: 24px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #e06666; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;lt;script src=&quot;https://cdn.ckeditor.com/4.5.11/full/ckeditor.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;Next step is to import CKEditor module into our project&#39;s&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;color: #383838;&quot;&gt;main module in angular ie, app.module. your code should look as below after importing&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;CKEditorModule&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #383838; letter-spacing: 0.21px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: transparent; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;font-family: gotham, helvetica, sans-serif; font-size: 14px; color: #ff6600;&quot; style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;import { CKEditorModule } from &#39;ng2-ckeditor&#39;&lt;br /&gt;@NgModule({ &lt;br /&gt;&amp;nbsp; &amp;nbsp;...&lt;br /&gt;&amp;nbsp; &amp;nbsp;imports: [CKEditorModule], &lt;br /&gt;&amp;nbsp; ... &lt;br /&gt;})&lt;br /&gt;export class AppModule {}&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now I want to create a new component to view Html&amp;nbsp;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;editor&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;so, i will create a component with name ck&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;editor&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;by executing the following command on your project command prompt as shown below.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span style=&quot;color: orange; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;ng generate &lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;component&amp;nbsp;&lt;/span&gt;ckeditor&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;this will create a&amp;nbsp;folder with name as &quot;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;CKE&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;ditorComponent&lt;/span&gt;&quot; in your projects&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;src/app&lt;/strong&gt;&amp;nbsp;folder.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now open app.module.ts in your editor and import &#39;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;CKE&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;ditorComponent&lt;/span&gt;&#39; as shown below.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;import { CKEditorModule } from &#39;ng2-ckeditor&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #ff6600; letter-spacing: 0.21px;&quot;&gt;import&amp;nbsp;{&amp;nbsp;CkeditorComponent&amp;nbsp;}&amp;nbsp;from&amp;nbsp;&#39;./ckeditor/&lt;/span&gt;&lt;span style=&quot;color: #ff6600; letter-spacing: 0.21px;&quot;&gt;ckeditor&lt;/span&gt;&lt;span style=&quot;color: #ff6600; letter-spacing: 0.21px;&quot;&gt;.component&#39;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;@&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;({&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;declarations:&lt;/span&gt;&amp;nbsp;[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #ff6600; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;CkeditorComponent&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;imports:&lt;/span&gt;&amp;nbsp;[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;CKEditorModule,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;providers:&lt;/span&gt;&amp;nbsp;[],&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;bootstrap:&lt;/span&gt;&amp;nbsp;[&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;})&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;export&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;AppModule&lt;/span&gt;&amp;nbsp;{ }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #383838;&quot;&gt;Now open ckeditor&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;.component.html and copy and paste the below given code.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;pre style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; letter-spacing: 0.015em; line-height: 1.57143em; padding: 0px;&quot; xml:space=&quot;preserve&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;lt;h3&amp;gt;&lt;span style=&quot;font-size: small;&quot;&gt;Angular CKEditor&lt;/span&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&amp;lt;ckeditor&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; [(ngModel)]=&quot;ckeditorContent&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;debounce=&quot;500&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;lt;/ckeditor&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;Next open ckeditor&lt;/span&gt;&lt;span style=&quot;color: #383838; letter-spacing: 0.21px;&quot;&gt;.component.ts and copy and paste the below given ts code.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; line-height: 1.57143em; table-layout: fixed; width: 693px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;import { Component, OnInit } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Component({&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; selector: &#39;app-ckeditorcomp&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; templateUrl: &#39;./ckeditorcomp.component.html&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; styleUrls: [&#39;./ckeditorcomp.component.css&#39;]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;export class CkeditorcompComponent implements OnInit {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; ckeditorContent: any;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; constructor() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;this.ckeditorContent = &#39;&amp;lt;p&amp;gt;Some html&amp;lt;/p&amp;gt;&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; ngOnInit() {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br clear=&quot;none&quot; style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Please save the above files and refresh your project to check if your code is running fine. if you have implemented the code as explained/ given you should be greeted with an HTML editor in your ckeditor component.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;h2 style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: orange; letter-spacing: 0.21px;&quot;&gt;&lt;b&gt;Tips :&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;In case any error appears, please do check imported modules(root components) and also js import in index&amp;nbsp; file.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; If Case if you are getting the following error &quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Can&#39;t bind to &#39;ngModel&#39; since it isn&#39;t a known property of ckeditor&amp;nbsp;&quot;&lt;span style=&quot;color: #444444;&quot;&gt;, Please import common module along with form module.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; box-sizing: border-box; color: #383838; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #383838; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; letter-spacing: 0.21px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/6630062337659913600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=6630062337659913600&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6630062337659913600'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6630062337659913600'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2019/01/how-to-implement-ckeditor-in-angular.html' title='How to Implement ckeditor in Angular'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-As7ijkEo7Kc/XFMm1nO9pcI/AAAAAAAAA9s/oQjEnBcYwR4cLsBSR2knQ4kahMUlu3t5wCLcBGAs/s72-c/ekEditor%2Bimage.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-4840255802663270522</id><published>2018-09-25T21:12:00.000-07:00</published><updated>2018-09-25T21:13:33.566-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="angular"/><category scheme="http://www.blogger.com/atom/ns#" term="angular 4"/><category scheme="http://www.blogger.com/atom/ns#" term="angular js"/><category scheme="http://www.blogger.com/atom/ns#" term="datatable angular"/><category scheme="http://www.blogger.com/atom/ns#" term="datatables in angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ngx-datatable"/><category scheme="http://www.blogger.com/atom/ns#" term="ngx-datatable in angular"/><title type='text'>How to implement ngx-datatable in angular</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;Did you came across a situation where your plain table in angular is not enough to please the user or the organisation you&#39;re working for.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;if yes this post will show you how to easily implement data tables in angular without writing your own code from scratch.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;a data-mce-href=&quot;https://github.com/swimlane/ngx-datatable&quot; href=&quot;https://github.com/swimlane/ngx-datatable&quot; shape=&quot;rect&quot; style=&quot;border: 0px; color: #047ac6; cursor: pointer; line-height: 1.57143em; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;ngx-datatable&lt;/a&gt;&amp;nbsp;is an Angular component for presenting large and complex data. we are going to use this custom component to show our data in a more feature packed table.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;first, lets create a project in angular. i had already created a project so, i&#39;m going to use that. if you want to know how to create a project in angular, you can check it&amp;nbsp;&lt;a data-mce-href=&quot;http://www.gowriter.in&quot; href=&quot;http://www.gowriter.in/&quot; shape=&quot;rect&quot; style=&quot;border: 0px; color: #047ac6; cursor: pointer; line-height: 1.57143em; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;Now to use ngx-datable in our angular project we have to first install the module into our project. to do so copy and paste the below code to your projects command prompt and click on enter.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;font-family: gotham, helvetica, sans-serif; font-size: 14px; color: #ff6600;&quot; style=&quot;color: #ff6600; font-family: gotham, helvetica, sans-serif; line-height: 1.57143em;&quot;&gt;npm i @swimlane/ngx-datatable --save&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;this will install the&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;ngx-datatable&amp;nbsp;&lt;/span&gt;module to our angular project. now since the ngx-datatable is installed into our project, lets see how to implement it and view ngx-datatable on our angular project.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;I want to create a new component to view datatable so, i will create a component with name ngxtable by executing the following command on your project command prompt as shown below.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;ng generate component ngxtable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;this will create a&amp;nbsp;folder with name as &quot;ngxtable&quot; in your projects&amp;nbsp;&lt;strong style=&quot;line-height: 1.57143em;&quot;&gt;src/app&lt;/strong&gt;&amp;nbsp;folder.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;Now open app.module.ts in your editor and import &#39;NgxtableComponent&#39; as shown below.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;NgxDatatableModule&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;@swimlane/ngx-datatable&#39;&lt;/span&gt;;&lt;/div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;import&amp;nbsp;{&amp;nbsp;NgxtableComponent&amp;nbsp;}&amp;nbsp;from&amp;nbsp;&#39;./ngxtable/ngxtable.component&#39;;&lt;/span&gt;&lt;/div&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;@&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;NgModule&lt;/span&gt;({&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;declarations:&lt;/span&gt;&amp;nbsp;[&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;NgxtableComponent&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;],&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;imports:&lt;/span&gt;&amp;nbsp;[&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;BrowserModule&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;NgxDatatableModule&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;],&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;providers:&lt;/span&gt;&amp;nbsp;[],&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;bootstrap:&lt;/span&gt;&amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;AppComponent&lt;/span&gt;]&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;})&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;export&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;AppModule&lt;/span&gt;&amp;nbsp;{ }&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;Now open ngxtable.component.ts and declare rows and columns as shown below.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: Monaco, Courier, monospace; line-height: 1.57143em; padding: 0px;&quot; xml:space=&quot;preserve&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;rows&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;[&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;John&#39;, gender: &#39;Male&#39;, company: &#39;Wipro&#39; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;lakshmi&#39;, gender: &#39;Female&#39;, company: &#39;TATA&#39; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;Henry&#39;, gender: &#39;Male&#39;, company: &#39;Burger King&#39; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;Jacob&#39;, gender: &#39;Male&#39;, company: &#39;Microsoft&#39; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;Harry&#39;, gender: &#39;Male&#39;, company: &#39;IBM&#39; },&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;{ name: &#39;Jessica&#39;, gender: &#39;Female&#39;, company: &#39;Apple&#39; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;columns&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;[&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;prop&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ffcc00;&quot; style=&quot;color: #ffcc00; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;Company&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;next open &#39;ngxtable.html&#39; and paste the below given code to it.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: Monaco, Courier, monospace; line-height: 1.57143em; padding: 0px;&quot; xml:space=&quot;preserve&quot;&gt;&amp;lt;div&amp;gt;&lt;/pre&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;ngx-datatable&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;class=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;material striped&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;rows&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;rows&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;columns&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;columns&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;columnMode&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;&#39;force&#39;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;headerHeight&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;50&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;footerHeight&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;50&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;rowHeight&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;50&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp; &amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;limit&lt;/span&gt;]=&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&quot;3&quot;&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&amp;lt;&lt;/span&gt;/&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;ngx-datatable&lt;/span&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;save the above files and run your project. navigate to your component ( if you&amp;nbsp;don&#39;t know how to navigate to other component on angular&amp;nbsp;, you can check it&amp;nbsp;&lt;a data-mce-href=&quot;http://www.gowriter.in/&quot; href=&quot;http://www.gowriter.in/&quot; shape=&quot;rect&quot; style=&quot;border: 0px; color: #047ac6; cursor: pointer; line-height: 1.57143em; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&amp;nbsp; ) and check if the table is working.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;By default&amp;nbsp;the data-table is not styled. this makes it easy for us to style it as we wish.&amp;nbsp;ngx-datatable is also provided with a separate material theme. In order to use it, you need to include the following in your project ngx-datatable.css file.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: Monaco, Courier, monospace; line-height: 1.57143em; padding: 0px;&quot; xml:space=&quot;preserve&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;@&lt;/span&gt;import&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;~@swimlane/ngx-datatable/release/index.css&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;@&lt;/span&gt;import&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;~@swimlane/ngx-datatable/release/themes/material.css&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;@&lt;/span&gt;import&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;~@swimlane/ngx-datatable/release/assets/icons.css&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;check now to see if the styling is applied. if not please import the ViewEncapsulation to your component as shown below.&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; data-mce-style=&quot;border-collapse: collapse; table-layout: fixed;&quot; style=&quot;border-collapse: collapse; font-size: 1em; line-height: 1.57143em; table-layout: fixed; width: 100%;&quot;&gt;&lt;tbody style=&quot;line-height: 1.57143em;&quot;&gt;&lt;tr style=&quot;line-height: 1.57143em;&quot;&gt;&lt;td colspan=&quot;1&quot; data-mce-style=&quot;padding: 10.0px; margin: 0.0px; border: 1.0px solid #d9d9d9;&quot; rowspan=&quot;1&quot; style=&quot;border: 1px solid rgb(217, 217, 217); line-height: 1.57143em; margin: 0px; padding: 10px; vertical-align: top;&quot; valign=&quot;top&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;import { ViewEncapsulation } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;Component&lt;/span&gt;({&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;selector:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;app-ngxtable&#39;&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;templateUrl:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;./ngxtable.component.html&#39;&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&amp;nbsp;styleUrls:&lt;/span&gt;&amp;nbsp;[&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;&#39;./ngxtable.component.css&#39;&lt;/span&gt;],&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span data-mce-style=&quot;color: #ff6600;&quot; style=&quot;color: #ff6600; line-height: 1.57143em;&quot;&gt;&amp;nbsp;encapsulation: ViewEncapsulation.None&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;})&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;br clear=&quot;none&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; color: #383838; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;strong style=&quot;line-height: 1.57143em;&quot;&gt;Note:&lt;/strong&gt;&amp;nbsp;if you get any error like &#39; rxjs_1.fromEvent is not a function &#39; when sorting table update your &#39;rxjs &amp;amp;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;rxjs-compat&#39; node modules to latest versions.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;line-height: 1.57143em;&quot;&gt;the final output of our code will look something like this.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-DVykbUYD450/W6sGgOJmJMI/AAAAAAAAA7g/vRMdJGFiBYQO_64ctOz4rmryqdNr-CgQwCK4BGAYYCw/s1600/ngx-table-gowriter.JPG&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://4.bp.blogspot.com/-DVykbUYD450/W6sGgOJmJMI/AAAAAAAAA7g/vRMdJGFiBYQO_64ctOz4rmryqdNr-CgQwCK4BGAYYCw/s640/ngx-table-gowriter.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; line-height: 1.57143em; margin: 0px; padding: 0px;&quot;&gt;that&#39;s it, we have our ngx-datatable up and working. for more options on how to manipulate ngx-datatable, check this link&amp;nbsp;&lt;a data-mce-href=&quot;http://swimlane.github.io/ngx-datatable/&quot; href=&quot;http://swimlane.github.io/ngx-datatable/&quot; shape=&quot;rect&quot; style=&quot;border: 0px; color: #047ac6; cursor: pointer; line-height: 1.57143em; margin: 0px; padding: 0px;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/4840255802663270522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=4840255802663270522&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4840255802663270522'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4840255802663270522'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/09/how-to-implement-ngx-datatable-in.html' title='How to implement ngx-datatable in angular'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-DVykbUYD450/W6sGgOJmJMI/AAAAAAAAA7g/vRMdJGFiBYQO_64ctOz4rmryqdNr-CgQwCK4BGAYYCw/s72-c/ngx-table-gowriter.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-6865859389913811068</id><published>2018-03-24T03:34:00.004-07:00</published><updated>2018-03-24T03:34:51.591-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to"/><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2 modal"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 3"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 3 modal"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic framework"/><category scheme="http://www.blogger.com/atom/ns#" term="ModalController"/><category scheme="http://www.blogger.com/atom/ns#" term="open modal in ionic"/><title type='text'>How to Implement ModalController in Ionic 2 and Ionic 3.</title><content type='html'>&lt;article&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;A Modal is similar to page, but it goes over the app’s current page and is displayed as a popup page. Modal is generally used to select an item from a group or to make a choice. &lt;/div&gt;&lt;p&gt;A Modal uses the NavController to present itself . It is added to the stack similar to how NavControllers push works. &lt;/p&gt;&lt;p&gt;A modal is “Presented” by calling Present method. &lt;/p&gt; &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;ionicModal.present();&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  After the modal has been presented, The modal can later be closed or “dismissed” from within the component instance by using the ViewController’s dismiss method.  Data can be passed to a new modal through create method as the second argument. &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt; let ionicModal = this.modalCtrl.create(ionicModal, { Id: 5 });&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; The data that is passed through create method, can then be accessed from the opened page/modal by using NavParams.   &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt; this.params.get(&#39;Id&#39;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once the Modal work is done with, when the modal is dismissed, we can send back or pass required data from modal to previous page by calling the dismiss method. &lt;/p&gt;&lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt; this.viewCtrl.dismiss(data)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, that the modal is closed, the data is passed from modal is received at onDidDismiss method. &lt;/p&gt;&lt;pre class=&quot;  language-js&quot;&gt;&lt;code class=&quot;  language-js&quot;&gt;&lt;br /&gt;   ionicModal.onDidDismiss(data =&gt; {&lt;br /&gt;     console.log(data);&lt;br /&gt;   });&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Code and Paste the below given code to your myhomepage.ts file.&lt;/div&gt;  &lt;p style=&quot;text-align: right;     margin-bottom: .5em;     font-size: .8em&quot;&gt;&lt;span style=&quot; font-size: 15px;     font-family: monospace;     border-bottom: 2px solid #ffc107;&quot;&gt;myhomepage.ts&lt;/span&gt;&lt;/p&gt; &lt;pre class=&quot;  language-js&quot;&gt;&lt;code class=&quot;  language-js&quot;&gt;&lt;br /&gt;    import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;    import { ModalController, ViewController } from &#39;ionic-angular&#39;;&lt;br /&gt;    import { NavController, NavParams } from &#39;ionic-angular&#39;;&lt;br /&gt;    import { DetailsPage } from &#39;../details/details&#39;&lt;br /&gt;    @Component({&lt;br /&gt;    selector: &#39;page-home&#39;,&lt;br /&gt;    templateUrl: &#39;home.html&#39;&lt;br /&gt;    })&lt;br /&gt;    export class HomePage {&lt;br /&gt;    UserId:any;&lt;br /&gt;    UserName:any&lt;br /&gt;    constructor(public modalCtrl: ModalController,public params: NavParams) {&lt;br /&gt;    this.UserId = this.params.get(&#39;id&#39;);&lt;br /&gt;    this.UserName = this.params.get(&#39;name&#39;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    presentModal() {&lt;br /&gt;    let MyNewModal = this.modalCtrl.create(DetailsPage , { name: &quot;kumar&quot;});&lt;br /&gt;    MyNewModal.onDidDismiss(data =&gt; {&lt;br /&gt;    console.log(data);&lt;br /&gt;    });&lt;br /&gt;    MyNewModal.present();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Code and Paste the below given code to your details.ts file.&lt;/div&gt;&lt;/p&gt;&lt;p style=&quot;text-align: right;     margin-bottom: .5em;     font-size: .8em&quot;&gt;&lt;span style=&quot; font-size: 15px;     font-family: monospace;     border-bottom: 2px solid #ffc107;&quot;&gt;details.ts&lt;/span&gt;&lt;/p&gt; &lt;pre class=&quot;  language-js&quot;&gt;&lt;code class=&quot;  language-js&quot;&gt;&lt;br /&gt;    import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;    import { NavController, NavParams } from &#39;ionic-angular&#39;;&lt;br /&gt;    import { ModalController, ViewController } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt;    @Component({&lt;br /&gt;    selector: &#39;page-details&#39;,&lt;br /&gt;    templateUrl: &#39;details.html&#39;&lt;br /&gt;    })&lt;br /&gt;    export class DetailsPage {&lt;br /&gt;&lt;br /&gt;    constructor(public viewCtrl: ViewController) {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    dismiss() {&lt;br /&gt;    let data = { &#39;name&#39;:&#39;kumar&#39;,&#39;id&#39;:&#39;12345&#39; };&lt;br /&gt;    this.viewCtrl.dismiss(data);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/article&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/6865859389913811068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=6865859389913811068&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6865859389913811068'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6865859389913811068'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/how-to-implement-modalcontroller-in.html' title='How to Implement ModalController in Ionic 2 and Ionic 3.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-8588226774930055745</id><published>2018-03-23T04:42:00.001-07:00</published><updated>2018-03-23T04:42:25.099-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="android emulator"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Encryption unsuccessful"/><title type='text'>Encryption Unsuccessful when launching Android Emulator in Android Studio.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Getting &quot; Encryption unsuccessful &quot; when trying to launch Android Emulator.&lt;/blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-pMfnwUX_LAQ/WrTVjnrU_ZI/AAAAAAAAA4Q/G3UX1id2JusOehL69SMNFoixf7zqdH3GwCLcBGAs/s1600/mobile%2Bframe.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;540&quot; data-original-width=&quot;268&quot; height=&quot;320&quot; src=&quot;https://3.bp.blogspot.com/-pMfnwUX_LAQ/WrTVjnrU_ZI/AAAAAAAAA4Q/G3UX1id2JusOehL69SMNFoixf7zqdH3GwCLcBGAs/s320/mobile%2Bframe.png&quot; width=&quot;159&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;article&gt;If you are getting Encryption Unsuccessful message on your android emulator when it&#39;s launched, then follow the below steps to solve the problem.&lt;/article&gt;&lt;article&gt;&lt;br /&gt;&lt;/article&gt;&lt;article&gt;&lt;b&gt;STEP 1 : &lt;/b&gt;Open Android Studio if not already opened.&lt;/article&gt;&lt;article&gt;&lt;br /&gt;&lt;/article&gt;&lt;article&gt;&lt;b&gt;STEP 2 :&lt;/b&gt;&amp;nbsp;In the Menu bar go to&amp;nbsp;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; font-stretch: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Tools&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; font-stretch: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Android&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; font-stretch: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AVD Manager.&amp;nbsp;&lt;/strong&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-RBrPiCBQAJU/WrTbyjre_NI/AAAAAAAAA5I/EqQ7OJ_cXzwhw1wULKCATDrxdjzBvUF8wCLcBGAs/s1600/tools.JPG&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;25&quot; data-original-width=&quot;585&quot; height=&quot;27&quot; src=&quot;https://3.bp.blogspot.com/-RBrPiCBQAJU/WrTbyjre_NI/AAAAAAAAA5I/EqQ7OJ_cXzwhw1wULKCATDrxdjzBvUF8wCLcBGAs/s640/tools.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;OR&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;You can directly press the below&amp;nbsp; shown icon to go to AVD Manager.&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-mCgaDpGXNHc/WrTZJVwg4fI/AAAAAAAAA4w/qLZDQ1ZY9NcBK-b3Va_pQ58xL5cgDOZcACLcBGAs/s1600/adv%2Bmanager.png&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;56&quot; data-original-width=&quot;735&quot; height=&quot;49&quot; src=&quot;https://4.bp.blogspot.com/-mCgaDpGXNHc/WrTZJVwg4fI/AAAAAAAAA4w/qLZDQ1ZY9NcBK-b3Va_pQ58xL5cgDOZcACLcBGAs/s640/adv%2Bmanager.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;STEP 3 : &lt;/b&gt;Now in the &lt;b&gt;ADV MANAGER&lt;/b&gt; Window,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;click on the&amp;nbsp;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;▼&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt; (Down Arrow) in the Actions tab.&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;STEP 4 :&lt;/b&gt;&amp;nbsp;You will get a new popup with some options, click on &lt;b&gt;Wipe Data &lt;/b&gt;and confirm the action&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-LohJmsJqDl0/WrTVjkmbNSI/AAAAAAAAA4U/yTtkkakxZbA_ngu8jDfG_wStPpq9bu9JQCPcBGAYYCw/s1600/wipedata-gowriter.png&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;545&quot; data-original-width=&quot;1284&quot; height=&quot;268&quot; src=&quot;https://1.bp.blogspot.com/-LohJmsJqDl0/WrTVjkmbNSI/AAAAAAAAA4U/yTtkkakxZbA_ngu8jDfG_wStPpq9bu9JQCPcBGAYYCw/s640/wipedata-gowriter.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;That&#39;s it, Now restrat your android studio for the changes to take effect. Now, Your emulator should work perfectly without &quot;Encryption Unsuccessfull&quot; error.&lt;/span&gt;&lt;/span&gt;&lt;/article&gt;&lt;article&gt;&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/article&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/8588226774930055745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=8588226774930055745&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8588226774930055745'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8588226774930055745'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/Encryption-Unsuccessful-when-launching-Android-Emulator-in-Android-Studio.html' title='Encryption Unsuccessful when launching Android Emulator in Android Studio.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-pMfnwUX_LAQ/WrTVjnrU_ZI/AAAAAAAAA4Q/G3UX1id2JusOehL69SMNFoixf7zqdH3GwCLcBGAs/s72-c/mobile%2Bframe.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-8919370803208167758</id><published>2018-03-10T03:25:00.005-08:00</published><updated>2018-03-10T03:25:58.630-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dojo"/><category scheme="http://www.blogger.com/atom/ns#" term="Dojo 2"/><category scheme="http://www.blogger.com/atom/ns#" term="Dojo 2 application widget"/><category scheme="http://www.blogger.com/atom/ns#" term="widget creation dojo 2"/><title type='text'>Creating  Application Widget in Dojo 2</title><content type='html'>&lt;article&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Dojo 2 is used for Creating Enterprise-grade Web Applications. in the previous post we have seen on &lt;a href=&quot;http://gowriter.blogspot.in/2018/03/widgets-creation-in-dojo-2-application.html&quot;&gt;how to create a widget in Dojo 2 application&lt;/a&gt;.In this post we will be creating a sample application widget which combines all the child widgets together. &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-Y9tr-hY2Ilo/WqOA1gRG_sI/AAAAAAAAA18/LSp-mWcSz6YWr6pLzqJT_cy17tsoCsMIgCLcBGAs/s1600/Dojo%2B2%2BApplication%2BWidget.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1000&quot; height=&quot;320&quot; src=&quot;https://4.bp.blogspot.com/-Y9tr-hY2Ilo/WqOA1gRG_sI/AAAAAAAAA18/LSp-mWcSz6YWr6pLzqJT_cy17tsoCsMIgCLcBGAs/s320/Dojo%2B2%2BApplication%2BWidget.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We will not be creating a widget here again, i will use the &lt;a href=&quot;http://gowriter.blogspot.in/2018/03/widgets-creation-in-dojo-2-application.html&quot;&gt;employeeDetails widget&lt;/a&gt;, that we have already created.  &lt;br /&gt;&lt;br /&gt;Now lets create a widget with name &lt;code .1em=&quot;&quot; .3em=&quot;&quot; consolas=&quot;&quot; courier=&quot;&quot; iberation=&quot;&quot; menlo=&quot;&quot; mono=&quot;&quot; monospace=&quot;&quot; padding:=&quot;&quot; pre-wrap=&quot;&quot; sfmono-regular=&quot;&quot; style=&quot;background: #fff; border-radius: 3px; border: 1px solid #dddddd; color: #353535;&quot; white-space:=&quot;&quot;&gt;App&lt;/code&gt;. This widget is the one which contains all the child widgets. This Widget represents the entire application that we are building.  &lt;br /&gt;Start by Creating an empty ts file name App ie &lt;b&gt;App.ts&lt;/b&gt;. Now open the App.ts file located in the &lt;code .1em=&quot;&quot; .3em=&quot;&quot; consolas=&quot;&quot; courier=&quot;&quot; iberation=&quot;&quot; menlo=&quot;&quot; mono=&quot;&quot; monospace=&quot;&quot; padding:=&quot;&quot; pre-wrap=&quot;&quot; sfmono-regular=&quot;&quot; style=&quot;background: #fff; border-radius: 3px; border: 1px solid #dddddd; color: #353535;&quot; white-space:=&quot;&quot;&gt;src/widgets&lt;/code&gt; directory, in your editor and paste the below dependency imports. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  import { WidgetBase } from &#39;@dojo/widget-core/WidgetBase&#39;;&lt;br /&gt;  import { v, w } from &#39;@dojo/widget-core/d&#39;;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first import ie, the WidgetBase class will be used as the base class for our App widget.&lt;br /&gt;WidgetBase works with the WidgetProperties interface to define the properties of the widget that are publicly accessible for the others to utilize. The Second import ie, the v functions is used to render virtual DOM nodes and w is used for widgets . Both v &amp;amp; w generate DNodes, that are the base type of all virtual DOM nodes in Dojo 2. &lt;br /&gt;&lt;br /&gt;Since we are trying to import widgets to App widget, we will next import employeeDetails widget that we created in the previous post. &lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  import EmployeeDetails from &#39;./widgets/employeeDetails&#39;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, Since we are done with the imports of the dependencies we need. let&#39;s create the App widget class.  &lt;br&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  export default class App extends WidgetBase {&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt; The App class is extending WidgetBase, which accepts the WidgetProperties interface. Here we have added the export and the default keywords before the class keyword. it is because of the ES6 standard approach for creating modules. &lt;br&gt;&lt;br&gt;Next, override WidgetBase&#39;s render method to generate the application&#39;s view. The protected render() method return&#39;s a DNode , or an array of DNode&#39;s, which are used by the application&#39;s projector to render the view. Here the v and w functions generates DNode&#39;s. &lt;br&gt;&lt;br&gt;Next create a simple render method by adding this to the App class, &lt;br&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;    protected render() {&lt;br /&gt;        return v(&#39;div&#39;);&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;The above method when executed will return a div and generate a div virtual node. &lt;br&gt;Now, Since we are creating an application widget we need to render the child widgets to our app widget, to do that we should use w function that is designed to render widgets (v is designed to render virual DOM Nodes).to render EmployeeDetails  widget with w function, it should be as follows. &lt;br&gt;&lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;w(Banner, {})&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt; Now, update your render method as shown below, to include EmployeeDetails widget as a child node in App Widgets div node. &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;    protected render() {&lt;br /&gt;        return v(&#39;div&#39;, [&lt;br /&gt;            w(EmployeeDetails , {})&lt;br /&gt;        ]);&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;The w function takes two parameters - a widget class (the name of the widget to render) and an object literal (which passes values to the widget). In this case, the EmployeeDetails class is not using WidgetProperties. If you want to send data, the WidgetProperties have 2 properties are optional.Below is the structure of the WidgetProperties, if you want to use it for your widget. &lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  export interface WidgetProperties {&lt;br /&gt;      key?: string;&lt;br /&gt;      bind?: any;&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; let&#39;s say you have another widget let&#39;s say CompanyDetails, to integrate in the App widget, you can do this as follows, &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;    protected render() {&lt;br /&gt;        return v(&#39;div&#39;, [&lt;br /&gt;            w(EmployeeDetails , {}),&lt;br /&gt;            w(CompanyDetails, {})&lt;br /&gt;        ]);&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;That&#39;s it for the Application Widget. if you want to add more widgets just import them to App.js file and include the widget class along with the object literal in the respected div node in v function. &lt;br&gt;&lt;br&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Example App.ts file &lt;/div&gt;&lt;br&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; import { WidgetBase } from &#39;@dojo/widget-core/WidgetBase&#39;;&lt;br /&gt; import { v, w } from &#39;@dojo/widget-core/d&#39;;&lt;br /&gt; import EmployeeDetails from &#39;./employeeDetails&#39;;&lt;br /&gt; import CompanyDetails from &#39;./companyDetails&#39;;&lt;br /&gt;&lt;br /&gt; export default class App extends WidgetBase {&lt;br /&gt;    protected render() {&lt;br /&gt;        return v(&#39;div&#39;, [&lt;br /&gt;            w(EmployeeDetails , {}),&lt;br /&gt;            w(CompanyDetails, {})&lt;br /&gt;        ]);&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt; Make App Widget as your root Widget &lt;/div&gt;&lt;br&gt;Now that the App widget contains all the other widgets as child widget&#39;s, we should change our main.ts to import App widget.and also make sure to pass App class into the ProjectorMixin function. &lt;br&gt;&lt;br&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Example main.ts file &lt;/div&gt;&lt;br&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  import { ProjectorMixin } from &#39;@dojo/widget-core/mixins/Projector&#39;;&lt;br /&gt;  import App from &#39;./widgets/App&#39;;&lt;br /&gt;&lt;br /&gt;  const Projector = ProjectorMixin(App);&lt;br /&gt;  const projector = new Projector();&lt;br /&gt;&lt;br /&gt;  projector.append();&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;  &lt;article&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/8919370803208167758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=8919370803208167758&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8919370803208167758'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8919370803208167758'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/creating-application-widget-in-dojo-2.html' title='Creating  Application Widget in Dojo 2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-Y9tr-hY2Ilo/WqOA1gRG_sI/AAAAAAAAA18/LSp-mWcSz6YWr6pLzqJT_cy17tsoCsMIgCLcBGAs/s72-c/Dojo%2B2%2BApplication%2BWidget.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-7365936118341299180</id><published>2018-03-07T23:32:00.002-08:00</published><updated>2018-03-09T02:09:43.519-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dojo"/><category scheme="http://www.blogger.com/atom/ns#" term="Dojo 2"/><category scheme="http://www.blogger.com/atom/ns#" term="dojo 2 widgets"/><category scheme="http://www.blogger.com/atom/ns#" term="widget creation dojo 2"/><title type='text'>Widgets Creation in Dojo 2 Application</title><content type='html'> &lt;article&gt;&lt;b&gt;Dojo 2&lt;/b&gt; is powerful and advanced tool for creating applications. It is mainly used for Enterprise-grade Web Application Development. In this tutorial we are going to learn about how to create widgets in Dojo 2. we will be creating a sample employee details widget as shown below. &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-TB3tIREqUBg/WqDhofFuJfI/AAAAAAAAA0o/CIEpG4jqOSI-CGQvpoa6pZisPf7pJCFiACLcBGAs/s1600/dojo%2B2%2Bwidget%2Bcreation.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;580&quot; data-original-width=&quot;329&quot; height=&quot;320&quot; src=&quot;https://3.bp.blogspot.com/-TB3tIREqUBg/WqDhofFuJfI/AAAAAAAAA0o/CIEpG4jqOSI-CGQvpoa6pZisPf7pJCFiACLcBGAs/s320/dojo%2B2%2Bwidget%2Bcreation.JPG&quot; width=&quot;182&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This posts assumes that you already have the required environment set for creating projects in dojo 2. if not set please refer this post on how to &lt;a href=&quot;http://gowriter.blogspot.in/2018/03/getting-started-with-dojo-2.html&quot;&gt;Get started with Dojo 2&lt;/a&gt;.   &lt;h2&gt;Create a employeeDetails.ts file.&lt;/h2&gt;First Create a page with name employeeDetails.ts in your projects widgets directory. Now open employeeDetails.ts file in the editor and follow the below steps. &lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Copy and Paste the ts code to your employeeDetails.ts file.  &lt;/div&gt;&lt;div style=&quot;font-size: 0.8em; margin-bottom: 0.5em; text-align: right;&quot;&gt;&lt;span style=&quot;border-bottom: 2px solid #ffc107; font-family: monospace; font-size: 15px;&quot;&gt;employeeDetails.ts&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;import { WidgetBase } from &#39;@dojo/widget-core/WidgetBase&#39;;&lt;br /&gt;import { v} from &#39;@dojo/widget-core/d&#39;;&lt;br /&gt;import * as css from &#39;./styles/employeeDetails.m.css&#39;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;export default class EmployeeDetails extends WidgetBase {&lt;br /&gt;    &lt;br /&gt; protected render() {&lt;br /&gt;        return v(&#39;div&#39;,{classes:css.divStyle,styles:{&#39;font-weight&#39;:&#39;700&#39;}}, [ &#39;Employee Details&#39;, &lt;br /&gt;               v(&#39;div&#39;,{classes:css.childDiv},[&lt;br /&gt;    v(&#39;img&#39;, {&lt;br /&gt;     classes: css.imgStyle,&lt;br /&gt;     src: &#39;https://4.bp.blogspot.com/-agAs8bWPElU/Wp_Pz3j2gmI/AAAAAAAAA0M/umABRoJyg8YnNIbpnhz03_B3uMZ2FhtIgCLcBGAs/s320/boy.png&#39; })&lt;br /&gt;               ]),&lt;br /&gt;               v(&#39;div&#39;,{classes:css.textStyle}, [&lt;br /&gt;                   v(&#39;table&#39;,{styles:{&#39;margin&#39;:&#39;0 auto&#39;}},[&lt;br /&gt;                       v(&#39;tr&#39;,{},[&lt;br /&gt;                           v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                            &#39;Name :&#39;&lt;br /&gt;                           ]),&lt;br /&gt;                           v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                            v(&#39;strong&#39;,{classes:css.textDetails}, [ &#39;K V KUMAR&#39; ])&lt;br /&gt;                           ]) &lt;br /&gt;                       ]),&lt;br /&gt;                       &lt;br /&gt;                       v(&#39;tr&#39;,{},[&lt;br /&gt;                            v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                            &#39;Designation  :&#39;&lt;br /&gt;                            ]),&lt;br /&gt;                            v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                                v(&#39;strong&#39;,{classes:css.textDetails}, [ &#39;APP DEVELOPER&#39; ])&lt;br /&gt;                            ]) &lt;br /&gt;                        ]),&lt;br /&gt;&lt;br /&gt;                        v(&#39;tr&#39;,{},[&lt;br /&gt;                            v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                            &#39;Experience  :&#39;&lt;br /&gt;                            ]),&lt;br /&gt;                            v(&#39;td&#39;,{classes:css.td2Style},[&lt;br /&gt;                                v(&#39;strong&#39;,{classes:css.textDetails}, [ &#39;3 YEARS&#39; ])&lt;br /&gt;                            ]) &lt;br /&gt;                        ])&lt;br /&gt;                   ]),&lt;br /&gt;&lt;br /&gt;            ])&lt;br /&gt;            ])&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Create employeeDetails.m.css file  &lt;/div&gt;&lt;br /&gt;Create a file with name as employeeDetails.m.css, in your projects widgets/styles directory. &lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Copy and Paste the below give code to your employeeDetails.m.css file.  &lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-size: 0.8em; margin-bottom: 0.5em; text-align: right;&quot;&gt;&lt;span style=&quot;border-bottom: 2px solid #ffc107; font-family: monospace; font-size: 15px;&quot;&gt;employeeDetails.m.css&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;br /&gt;   .divStyle{&lt;br /&gt;    text-align: center;&lt;br /&gt;    color:black;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.childDiv{&lt;br /&gt;    margin-top: 40%;&lt;br /&gt;    border-radius: 5px;&lt;br /&gt;    background: #c3c3c3;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.imgStyle{&lt;br /&gt; width:50%;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.textStyle{&lt;br /&gt;    font-weight: 700;&lt;br /&gt;    padding: 5px 0 5px 0;&lt;br /&gt;    margin: 5px 0 0 0;&lt;br /&gt;    border-radius: 5px;&lt;br /&gt;    background: rgb(195, 195, 195);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.td1Style{&lt;br /&gt;   float:left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.td2Style{&lt;br /&gt;    width:50%;&lt;br /&gt;    text-align: left;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.textDetails{&lt;br /&gt;    vertical-align:middle;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Above Code Explanation...  &lt;/div&gt;&lt;br /&gt;Every widget creation in dojo 2 will have the below 2 imports as default.  &lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;import { WidgetBase } from &#39;@dojo/widget-core/WidgetBase&#39;;&lt;br /&gt;import { v} from &#39;@dojo/widget-core/d&#39;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The WidgetBase class is used as the base class for every widget created. WidgetBase defines the publicly accessible properties of the widget. and  the v function is used to render virtual DOM node, which is we will be doing all out html element creation here itself.  And now, the third import is the css file that we have just created. Here, we are importing all the classes in employeeDetails.m.css as css.  Now, since the imports are over for this example, lets go further below..  after imports every widget in dojo 2 has this class definition &lt;br /&gt;&lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;export default class &lt;widget name=&quot;&quot;&gt; extends WidgetBase {&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/widget&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;here the &lt;code style=&quot;background: #fff; border-radius: 3px; border: 1px solid #dddddd; color: #ffbf00; padding: 1px 3px 1px 3px;&quot;&gt;&lt;widget name=&quot;&quot;&gt;&lt;/widget&gt;&lt;/code&gt; contains your widgets name. &lt;br /&gt;Now, we need to define the &lt;code style=&quot;background: #fff; border-radius: 3px; border: 1px solid #dddddd; color: #ffbf00; padding: 1px 3px 1px 3px;&quot;&gt;render&lt;/code&gt; method inside our class we just created. &lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  protected render() {&lt;br /&gt;    return v(&#39;div&#39;);&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;this is the place all our widget is rendered. At present the above method will only generate a &lt;code style=&quot;background: #fff; border-radius: 3px; border: 1px solid #dddddd; color: #ffbf00; padding: 1px 3px 1px 3px;&quot;&gt;div&lt;/code&gt; virtual node.  &lt;br /&gt; every element created here must be within v function,it simply instructs Dojo 2 to create an HTML element. The v function contains the element name we want to create, an object literal and the the text or the child elements goes within the square brackets. the object literal contains the attributes that we have within an element. &lt;br /&gt;if you wish to add a widget inside a widget ie as a child of the above div node, follow the below steps.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;      protected render() {&lt;br /&gt;        return v(&#39;div&#39;, [&lt;br /&gt;            w(Banner, {})&lt;br /&gt;        ]);&lt;br /&gt;      }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;for the above code to work we need to import w from @dojo/widget-core/d. &lt;br /&gt;&lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;import { v, w } from &#39;@dojo/widget-core/d&#39;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt; Now, to see our widget in action, import EmployeeDetails widget to main.js. &lt;br&gt;&lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;import EmployeeDetails from &#39;./widgets/employeeDetails&#39;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;and modify projector constant as below, &lt;br&gt;&lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;const Projector = ProjectorMixin(EmployeeDetails);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt; That&#39;s it for the widget creation part for this post, refresh your  browser tab to see the changes. If you have any doubts regarding the above post please leave a comment below.  &lt;/article&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/7365936118341299180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=7365936118341299180&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7365936118341299180'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7365936118341299180'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/widgets-creation-in-dojo-2-application.html' title='Widgets Creation in Dojo 2 Application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-TB3tIREqUBg/WqDhofFuJfI/AAAAAAAAA0o/CIEpG4jqOSI-CGQvpoa6pZisPf7pJCFiACLcBGAs/s72-c/dojo%2B2%2Bwidget%2Bcreation.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-5914669983898180856</id><published>2018-03-07T03:04:00.001-08:00</published><updated>2018-03-07T03:34:19.101-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dojo"/><category scheme="http://www.blogger.com/atom/ns#" term="Dojo 2"/><category scheme="http://www.blogger.com/atom/ns#" term="Install Dojo 2"/><title type='text'>Getting Started with Dojo 2</title><content type='html'>&lt;b&gt;Dojo 2&lt;/b&gt; is powerful and advanced tool for creating applications. It is mainly used for Enterprise-grade Web Application Development. In this tutorial we are going to setup the environment to create Projects in Dojo 2. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-kXIwZuy5stc/Wp_GjXuVtZI/AAAAAAAAAzw/x4jtPwys9rcVI5oe-a3FfyEtCAFZzIgBACLcBGAs/s1600/Dojo%2B2%2Blogo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-kXIwZuy5stc/Wp_GjXuVtZI/AAAAAAAAAzw/x4jtPwys9rcVI5oe-a3FfyEtCAFZzIgBACLcBGAs/s400/Dojo%2B2%2Blogo.png&quot; width=&quot;400&quot; height=&quot;246&quot; data-original-width=&quot;512&quot; data-original-height=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Dojo 2 requires us to install its CLI, for creating, testing, and building its applications. First run the following command in your Command Prompt.  &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;npm install -g @dojo/cli&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; This command installs the Dojo&#39;s command-line tool. with which we are going to create our project.  It takes sometime for the cli to get installed on your system. after the installation gets finished without and errors. run the below command to create a new project on your system.  &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;dojo create --name myfirstapp&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; This command will create a basic Dojo 2 application in the newly created folder with name “myfirstapp”. your Dojo 2 project will come with all of its dependencies pre-installed. The project takes time to download to your system wait for it to complete.  After the project setup is completed, navigate to the project on your command prompt as sown below.   &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;cd myfirstapp&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; Now that you are in the &quot;myfirstapp&quot; directory, which is the Dojo 2 Project Folder. execute the below command in you command prompt for the Dojo 2 project to run on your browser.  &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;dojo build --watch --serve&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; The above commands shortest version is &lt;code style=&quot;color: #ffbf00;background: #fff;border: 1px solid #dddddd;border-radius: 3px;padding:1px 3px 1px 3px;&quot;&gt;dojo build -w -s&lt;/code&gt;.  This command will tell Dojo 2 to build and transpile the project . The --watch or -w flag watches and rebuilds your project whenever any changes are observed and the --serve or -s flag starts a simple web server which allows us to run our application in the browser while the modifications are done.  Now open Browser with link &lt;code style=&quot;color: #ffbf00;background: #fff;border: 1px solid #dddddd;border-radius: 3px;padding:1px 3px 1px 3px;&quot;&gt;http://localhost:9999/&lt;/code&gt;. you should see that the dojo 2 application is up and running.   </content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/5914669983898180856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=5914669983898180856&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5914669983898180856'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5914669983898180856'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/getting-started-with-dojo-2.html' title='Getting Started with Dojo 2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-kXIwZuy5stc/Wp_GjXuVtZI/AAAAAAAAAzw/x4jtPwys9rcVI5oe-a3FfyEtCAFZzIgBACLcBGAs/s72-c/Dojo%2B2%2Blogo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-5817054813657429270</id><published>2018-03-01T04:55:00.001-08:00</published><updated>2018-03-01T04:55:23.596-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="Loading Controller"/><category scheme="http://www.blogger.com/atom/ns#" term="Loading Indicator"/><title type='text'>How to implement Loading Indicator in ionic 2 and ionic 3.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;IonicFramework Provdes us with an preBuilt&amp;nbsp;components called as&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;&lt;b&gt;LoadingController&lt;/b&gt; &lt;/span&gt;which allows to create an overlay on top of the page, that can be used to indicate the user an activity is running in the background. Since&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;LoadingController creates an&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;overlay and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;appears on top of the app&#39;s content,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;it&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; blocks the user interaction untill the process is complete.&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-m0pmRTpYE8M/Wpf39ffdaOI/AAAAAAAAAxw/MXactDWQmusPgybRRZvQx3rmMeDA2WnwwCLcBGAs/s1600/loading%2Bplease%2Bwait%2Bwith%2Bspinner.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-m0pmRTpYE8M/Wpf39ffdaOI/AAAAAAAAAxw/MXactDWQmusPgybRRZvQx3rmMeDA2WnwwCLcBGAs/s320/loading%2Bplease%2Bwait%2Bwith%2Bspinner.gif&quot; width=&quot;188&quot; height=&quot;320&quot; data-original-width=&quot;326&quot; data-original-height=&quot;554&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now lets look at how to implement&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;loadingcontroller&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;in our ionic project. First as usual we will start by creating an page, lets name it as Dashboard.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; font-style: normal; font-weight: 400; letter-spacing: 0.21px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255); border-left: none; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 15px, rgba(0, 0, 0, 0.05) 0px 0px 4px; box-sizing: border-box; color: #7b7b7b; font-family: raleway, sans-serif; font-size: 15px; font-style: normal; letter-spacing: 0.015em; padding: 5px 20px; text-align: left; text-indent: 0px; text-transform: none; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code style=&quot;background: rgb(255, 255, 255); border-radius: 0px; box-sizing: border-box; display: block; font-family: Raleway, sans-serif; font-size: inherit; letter-spacing: 0.015em; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;&lt;b&gt;ionic generate page dashboard&lt;/b&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;This will create a d&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: normal;&quot;&gt;ashboard&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;folder in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; box-sizing: border-box; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;src/pages&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;folder in your projects root directory.which contains four files.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7b7b7b; font-family: sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;b style=&quot;box-sizing: border-box;&quot;&gt;1.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dashboard.html&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;b style=&quot;box-sizing: border-box;&quot;&gt;2&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;dashboard&lt;/span&gt;.module.ts&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;b style=&quot;box-sizing: border-box;&quot;&gt;3.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;dashboard&lt;/span&gt;.ts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;b style=&quot;box-sizing: border-box;&quot;&gt;4.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;i&lt;span style=&quot;letter-spacing: 0.21px;&quot;&gt;dashboard&lt;/span&gt;.scss&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;If d&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: normal;&quot;&gt;ashboard&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;.module.ts is not created by Ionic CLI, you should import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: normal;&quot;&gt;Dashboard&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Page into&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; box-sizing: border-box; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;app.module.ts&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;as below.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; font-style: normal; font-weight: 400; letter-spacing: 0.21px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;background: rgb(255, 255, 255); border-left: none; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 15px, rgba(0, 0, 0, 0.05) 0px 0px 4px; box-sizing: border-box; color: #7b7b7b; font-family: raleway, sans-serif; font-size: 15px; font-style: normal; letter-spacing: 0.015em; padding: 5px 20px; text-align: left; text-indent: 0px; text-transform: none; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code style=&quot;background: rgb(255, 255, 255); border-radius: 0px; box-sizing: border-box; display: block; font-family: Raleway, sans-serif; font-size: inherit; letter-spacing: 0.015em; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;&lt;b&gt;i&lt;span style=&quot;letter-spacing: 0.015em;&quot;&gt;mport { DashboardPage } from &#39;../pages/dashboard/dashboard&#39;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px; letter-spacing: 0.21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;The above line tell&#39;s the app that a page named&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Dashboard&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Page&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;is available at the particular location. Now Check to see if your project is running properly, without any errors.&lt;/span&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot; /&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; letter-spacing: 0.21px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; letter-spacing: 0.21px;&quot;&gt;Now since, the page is created and working fine, let&#39;s go to the coding part.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy and Paste the below ts code to your Components .ts file. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: none; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 15px, rgba(0, 0, 0, 0.05) 0px 0px 4px; box-sizing: border-box; color: #7b7b7b; font-family: raleway, sans-serif; font-size: 15px; letter-spacing: 0.015em; padding: 5px 20px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0px; box-sizing: border-box; display: block; font-family: raleway, sans-serif; font-size: inherit; letter-spacing: 0.015em; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;&lt;b style=&quot;background-color: white;&quot;&gt;i&lt;span style=&quot;letter-spacing: 0.015em;&quot;&gt;mport { LoadingController } from &#39;ionic-angular&#39;;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;after completing the above step, inject&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: rgba(231 , 174 , 1 , 0.36); border-bottom: 2px solid rgb(231 , 174 , 1); border-radius: 4px; box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;LoadingController&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;in to your pages constructor, in my case in dashboard.ts file as shown below.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  constructor(...., public loadingCtrl: LoadingController) {&lt;br /&gt;    ....&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;and Now let&#39;s modify our dashboard.html to include the below code.&lt;br /&gt;&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid rgb(250, 224, 66); padding-left: 0.8em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy and Paste the below html code to your Components .html file.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;  &amp;lt;ion-content&amp;gt;&lt;br /&gt;  &amp;lt;div style=&amp;quot;margin-top: 50%;&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;button ion-button full color=&amp;quot;secondary&amp;quot; (click)=&amp;quot;presentLoadingDefault()&amp;quot;&amp;gt;Please Wait...&amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;button ion-button full color=&amp;quot;danger&amp;quot; (click)=&amp;quot;presentLoadingText()&amp;quot;&amp;gt;Loader Without Spinner&amp;lt;/button&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;Next let&#39;s look at the functionality part shall we, &lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid rgb(250, 224, 66); padding-left: 0.8em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy and Paste the below ts code to your Components .ts file.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;   presentLoadingDefault() {&lt;br /&gt;    let loading = this.loadingCtrl.create({&lt;br /&gt;      content: &#39;Please wait...&#39;&lt;br /&gt;    });&lt;br /&gt;  &lt;br /&gt;    loading.present();&lt;br /&gt;  &lt;br /&gt;    setTimeout(() =&amp;gt; {&lt;br /&gt;      loading.dismiss();&lt;br /&gt;    }, 2000);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  presentLoadingText() {&lt;br /&gt;    let loading = this.loadingCtrl.create({&lt;br /&gt;      spinner: &#39;hide&#39;,&lt;br /&gt;      content: &#39;Loading Please Wait...&#39;&lt;br /&gt;    });&lt;br /&gt;  &lt;br /&gt;    loading.present();&lt;br /&gt;  &lt;br /&gt;    setTimeout(() =&amp;gt; {&lt;br /&gt;      loading.dismiss();&lt;br /&gt;    }, 200000);&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;loader can be dismissed by calling&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: rgba(231 , 174 , 1 , 0.36); border-bottom: 2px solid rgb(231 , 174 , 1); border-radius: 4px; box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: 0.21px; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;letter-spacing: normal;&quot;&gt;loading.dismiss()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;after our process is done, to resume user interaction with the app.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In second method that we have implemented above we have set spinner to hide, this hides the spinner and shows only the text.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;That&#39;s it,&amp;nbsp; feel free to comment below&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;if you have any queries or doubt&#39;s about the regarding above code implementation.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/5817054813657429270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=5817054813657429270&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5817054813657429270'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5817054813657429270'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/how-to-implement-loading-indicator-in.html' title='How to implement Loading Indicator in ionic 2 and ionic 3.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-m0pmRTpYE8M/Wpf39ffdaOI/AAAAAAAAAxw/MXactDWQmusPgybRRZvQx3rmMeDA2WnwwCLcBGAs/s72-c/loading%2Bplease%2Bwait%2Bwith%2Bspinner.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-5638326321081336231</id><published>2018-03-01T03:27:00.001-08:00</published><updated>2018-03-01T03:41:51.981-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="infinite scroll"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2 infinite scroll"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic scroll"/><title type='text'>How to implement Infinite Scrolling in ionic 2 and ionic 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;I&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;onic Framework has a predefined element called &lt;/span&gt;&lt;i style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; font-style: normal; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;ion-infinite-scroll&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; which allows you to perform an action when the user scrolls a specified distance from the bottom or top of the page.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-cq8sGdfW7RU/Wpfmuc_3CiI/AAAAAAAAAxU/lpPwslJrflYFHqHxXvCmqX5a8727EalnACLcBGAs/s1600/infinite%2Bscroll.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-cq8sGdfW7RU/Wpfmuc_3CiI/AAAAAAAAAxU/lpPwslJrflYFHqHxXvCmqX5a8727EalnACLcBGAs/s320/infinite%2Bscroll.gif&quot; width=&quot;181&quot; height=&quot;320&quot; data-original-width=&quot;313&quot; data-original-height=&quot;554&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;let&lt;b&gt;&#39;&lt;/b&gt;s create a page with name infinitescroll, using the below given command.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-image: none; background: #fff; border-left: none; box-shadow: 0px 0px 15px rgba(0 , 0 , 0 , 0.08) , 0px 0px 4px rgba(0 , 0 , 0 , 0.05); padding: 5px 20px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code style=&quot;background: #fff; display: block; overflow-x: auto; padding: 0.9em 0.5em;&quot;&gt;ionic generate page infinitescroll&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;This will create a infinitescroll folder in &lt;/span&gt;&lt;i style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; font-style: normal; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;src/pages&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; folder in your projects root directory.which contains four files.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;1.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;infinitescroll.html&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;2&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;infinitescroll.module.ts&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;3.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;infinitescroll.ts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;4.&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;infinitescroll.scss&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;if infinitescroll.module.ts is not created by ionic cli, you should import InfinitescrollPage into &lt;/span&gt;&lt;i style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; font-style: normal; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;app.module.ts&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; as below.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &lt;pre style=&quot;padding: 5px 20px !important;box-shadow: 0px 0px 15px rgba(0,0,0,0.08), 0px 0px 4px rgba(0,0,0,0.05) !important;border-left:none;    background-image: none !important;background:#fff !important;&quot;&gt;&lt;code style=&quot;display: block !important;overflow-x: auto !important;padding: .9em .5em !important;background:#fff !important;&quot;&gt;import { InfinitescrollPage } from &#39;../pages/infinitescroll/infinitescroll&#39;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;The above line tells the app that a page named InfinitescrollPage is available at the particular location. Now Check to see if your project is running properly, without any errors.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now since, the page is created and working fine, let&#39;s go to the coding part.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy and Paste the Below HTML Code to infinitescroll.html page. &lt;/span&gt;&lt;/div&gt;&lt;/br&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;  &amp;lt;ion-header&amp;gt;&lt;br /&gt;  &amp;lt;ion-navbar&amp;gt;&lt;br /&gt;    &amp;lt;button ion-button menuToggle&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;quot;menu&amp;quot;&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;    &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;ion-title&amp;gt;Infinite Scroll&amp;lt;/ion-title&amp;gt;&lt;br /&gt;  &amp;lt;/ion-navbar&amp;gt;&lt;br /&gt;&amp;lt;/ion-header&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ion-content&amp;gt;&lt;br /&gt;  &lt;br /&gt;   &amp;lt;ion-list style=&amp;quot;background: #e0e0e0;&amp;quot; no-lines&amp;gt;&lt;br /&gt;     &amp;lt;ion-item *ngFor=&amp;quot;let i of items&amp;quot; style=&amp;quot;margin-bottom: 2px;&amp;quot;&amp;gt;{{i}}&amp;lt;/ion-item&amp;gt;&lt;br /&gt;   &amp;lt;/ion-list&amp;gt;&lt;br /&gt;  &lt;br /&gt;   &amp;lt;ion-infinite-scroll (ionInfinite)=&amp;quot;doInfinite($event)&amp;quot;&amp;gt;&lt;br /&gt;     &amp;lt;ion-infinite-scroll-content&amp;gt;&amp;lt;/ion-infinite-scroll-content&amp;gt;&lt;br /&gt;   &amp;lt;/ion-infinite-scroll&amp;gt;&lt;br /&gt;  &lt;br /&gt;  &amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ionInfinite event will be fired when the scroll reaches the threshold distance. here we will be calling doInfinite method by passing $event parameter.  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy/Replace the Below ts Code to your infinitescroll.ts page. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;    import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;    import { NavController } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt;    @Component({&lt;br /&gt;    selector: &#39;page-home&#39;,&lt;br /&gt;    templateUrl: &#39;home.html&#39;&lt;br /&gt;    })&lt;br /&gt;    export class HomePage {&lt;br /&gt;    items = [];&lt;br /&gt;    constructor(public navCtrl: NavController) {&lt;br /&gt;        for (let i = 0; i &amp;lt; 30; i++) {&lt;br /&gt;        this.items.push( &quot;The Number is &quot;+this.items.length );&lt;br /&gt;        }&lt;br /&gt;     }&lt;br /&gt;    doInfinite(infiniteScroll) {&lt;br /&gt;        console.log(&#39;Begin async operation&#39;);&lt;br /&gt;&lt;br /&gt;        setTimeout(() =&amp;gt; {&lt;br /&gt;        for (let i = 0; i &amp;lt; 30; i++) {&lt;br /&gt;            this.items.push( &quot;The Number is &quot;+this.items.length );&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        console.log(&#39;Async operation has ended&#39;);&lt;br /&gt;        infiniteScroll.complete();&lt;br /&gt;        }, 500);&lt;br /&gt;    }&lt;br /&gt;    }   &lt;br /&gt;    &lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;H&lt;/b&gt;ere in the constructor we are initiating a for loop which loops for 30 times and pushes data to items array. Now When ever we scroll to the bottom of the list in this case the 30th item, infinite scroll triggers and calls the doInfinite method along with the event which specifies, from which index to get the data and push to items array.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;when the async process is complete we should stop the infinite scroll process or else the loader will be shown infinitely. To stop the infinite scroll process , you should call the infinite scroll&#39;s &lt;/span&gt;&lt;i style=&quot;background-color: rgba(231, 174, 1, 0.36); border-bottom: 2px solid rgb(231, 174, 1); border-radius: 4px; font-style: normal; line-height: inherit; padding: 5px 7px 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;complete()&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; method from within the infinite handler.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;that&#39;s it, check your browser to see if its working. Comment below if you have and queries or any doubt&#39;s regarding the above code implementation.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/5638326321081336231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=5638326321081336231&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5638326321081336231'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/5638326321081336231'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2018/03/how-to-implement-infinite-scrolling-in.html' title='How to implement Infinite Scrolling in ionic 2 and ionic 3'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-cq8sGdfW7RU/Wpfmuc_3CiI/AAAAAAAAAxU/lpPwslJrflYFHqHxXvCmqX5a8727EalnACLcBGAs/s72-c/infinite%2Bscroll.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-8312605842519235809</id><published>2017-08-27T06:22:00.001-07:00</published><updated>2017-08-27T06:28:35.608-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 3"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic framework"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic split pane"/><category scheme="http://www.blogger.com/atom/ns#" term="ionsplitpane"/><title type='text'>How to Implement Split Pane in Ionic 2 &amp; ionic 3</title><content type='html'>ionicframework SplitPane is a component that makes it possible to create multi-view layout.Similar to iPad apps, SplitPane allows UI elements, like Menus, to be displayed as the viewport increases.The new SplitPane component is perfect for apps that target desktops and large tablets. The SplitPane component is very easy to use and If the devices screen size is below a certain size, the SplitPane will collapse and the menu will become hidden again. &lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-ITg3Jdys7r8/WaLIbIt6HNI/AAAAAAAAAh0/Ilp37hRhDUMCwKEQ9S9XUDVi3q5jaMl6gCLcBGAs/s1600/splitscreenionic%2B1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;696&quot; data-original-width=&quot;550&quot; height=&quot;400&quot; src=&quot;https://1.bp.blogspot.com/-ITg3Jdys7r8/WaLIbIt6HNI/AAAAAAAAAh0/Ilp37hRhDUMCwKEQ9S9XUDVi3q5jaMl6gCLcBGAs/s400/splitscreenionic%2B1.JPG&quot; width=&quot;316&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-Goy9lKL8EZo/WaLIbXYn-9I/AAAAAAAAAh4/4_kA8vlwXfs9ivzkU_Z6oXWkQeVWbok_wCLcBGAs/s1600/splitscreen%2B2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;697&quot; data-original-width=&quot;723&quot; height=&quot;385&quot; src=&quot;https://2.bp.blogspot.com/-Goy9lKL8EZo/WaLIbXYn-9I/AAAAAAAAAh4/4_kA8vlwXfs9ivzkU_Z6oXWkQeVWbok_wCLcBGAs/s400/splitscreen%2B2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;To use SplitPane, Simply add the &lt;i style=&quot; background-color: rgba(231, 174, 1, 0.36);     line-height: inherit;     padding: 5px 7px 0;     white-space: pre-wrap;     border-bottom: 2px solid #e7ae01;     font-style: normal;     border-radius: 4px;&quot;&gt;&amp;lt;ion-split-pane&amp;gt; &lt;/i&gt; around your root component ie. &lt;i style=&quot; background-color: rgba(231, 174, 1, 0.36);     line-height: inherit;     padding: 5px 7px 0;     white-space: pre-wrap;     border-bottom: 2px solid #e7ae01;     font-style: normal;     border-radius: 4px;&quot;&gt;&amp;lt;ion-nav&amp;gt;&lt;/i&gt;, and add the main attribute to it . In this example, we&#39;ll be using a sidemenu layout template. &lt;p style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Code to implement SplitPane in ionic 2, just copy and paste in app.html&lt;/p&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-menu [content]=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;ion-header&amp;gt;&lt;br /&gt;      &amp;lt;ion-toolbar&amp;gt;&lt;br /&gt;        &amp;lt;ion-title&amp;gt;Menu&amp;lt;/ion-title&amp;gt;&lt;br /&gt;      &amp;lt;/ion-toolbar&amp;gt;&lt;br /&gt;    &amp;lt;/ion-header&amp;gt;&lt;br /&gt;   &amp;lt;ion-content&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;!-- the content body --&amp;gt;&lt;br /&gt;   &amp;lt;/ion-content&amp;gt;&lt;br /&gt;  &amp;lt;/ion-menu&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!-- the main content --&amp;gt;&lt;br /&gt;  &amp;lt;ion-nav [root]=&amp;quot;root&amp;quot; #content&amp;gt;&amp;lt;/ion-nav&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; add &lt;i style=&quot; background-color: rgba(231, 174, 1, 0.36);     line-height: inherit;     padding: 5px 7px 0;     white-space: pre-wrap;     border-bottom: 2px solid #e7ae01;     font-style: normal;     border-radius: 4px;&quot;&gt;&amp;lt;ion-split-pane&amp;gt;&lt;/i&gt; component to wrap around the main &lt;i style=&quot; background-color: rgba(231, 174, 1, 0.36);     line-height: inherit;     padding: 5px 7px 0;     white-space: pre-wrap;     border-bottom: 2px solid #e7ae01;     font-style: normal;     border-radius: 4px;&quot;&gt;&amp;lt;ion-nav&amp;gt;&lt;/i&gt; component like this.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane&amp;gt;&lt;br /&gt;  &amp;lt;!--  side menu  --&amp;gt;&lt;br /&gt;  &amp;lt;ion-menu [content]=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;ion-header&amp;gt;&lt;br /&gt;      &amp;lt;ion-toolbar&amp;gt;&lt;br /&gt;        &amp;lt;ion-title&amp;gt;Menu&amp;lt;/ion-title&amp;gt;&lt;br /&gt;      &amp;lt;/ion-toolbar&amp;gt;&lt;br /&gt;    &amp;lt;/ion-header&amp;gt;&lt;br /&gt;   &amp;lt;ion-content&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;!-- content body --&amp;gt;&lt;br /&gt;   &amp;lt;/ion-content&amp;gt;&lt;br /&gt;  &amp;lt;/ion-menu&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!-- main content --&amp;gt;&lt;br /&gt;  &amp;lt;ion-nav [root]=&amp;quot;root&amp;quot; #content&amp;gt;&amp;lt;/ion-nav&amp;gt;&lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; Now, add the main attribute to it so that Ionic knows what should go in the right part of the ionic split pane, ie the central component on the larger screens.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ion-nav [root]=&amp;quot;root&amp;quot; #content main&amp;gt;&amp;lt;/ion-nav&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; that&#39;s it, now if you play with your browser window by adjusting its layout size. you can see the side menu pane changing.  By default, SplitPane will oly appear if the screen is larger than 768px. we can customize this, by using when input property on ion-split-pane component as shown below.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane when=&amp;quot;(min-width: 475px)&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!--  side menu  --&amp;gt;&lt;br /&gt;  &amp;lt;ion-menu [content]=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;  &lt;br /&gt;  &amp;lt;/ion-menu&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;!-- main content --&amp;gt;&lt;br /&gt;  &amp;lt;ion-nav [root]=&amp;quot;root&amp;quot; #content main &amp;gt;&amp;lt;/ion-nav&amp;gt;&lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; Ionic SplitPane can alse be given some predefined media queries that can be used. they are &quot;xs&quot;, &quot;sm&quot;, &quot;md&quot;, &quot;lg&quot;, and &quot;xl&quot;. these specify the minimum width required to split the ionic-pane.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane when=&amp;quot;xs&amp;quot;&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; here,  xs : means min-width is 0px, this will make the split-pane to appear always.  sm: means min-width is 576px, this will make the split-pane to appear when the min-width is 576px  md: means min-width is 768px,this will show the split-pane when the min-width is 768px (default break point)  lg: means min-width is 992px, this will make the split-pane to appearwhen the min-width is 992px  xl: means min-width is 1200px, this will show the split-pane split-pane when the min-width is 1200px  One can also pass boolean values to it so that, it will trigger SplitPane when the value or expression evaluates to true.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane [when]=&amp;quot;isSmall&amp;quot;&amp;gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; in .ts file above constructer add this &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;class MySplittPaneClass {&lt;br /&gt;&lt;br /&gt;  public isSmall= true;&lt;br /&gt;  constructor(){}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; or, you can call a method like this  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-split-pane [when]=&amp;quot;showSplitScreen()&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ion-split-pane&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; in respectedd .ts file add this, &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;class MySplittPaneClass {&lt;br /&gt;&lt;br /&gt;  constructor(){}&lt;br /&gt;&lt;br /&gt;  showSplitScreen(){&lt;br /&gt;&lt;br /&gt;    if(conditionA){&lt;br /&gt;      return true;&lt;br /&gt;    } else {&lt;br /&gt;      return false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;border-left: 3px solid #FAE042; padding-left: .8em; text-align: justify;&quot;&gt;Disable ionSplitPane&lt;/p&gt;to disable or enable split pane in ionic project, use input property &quot;enable&quot;. it takes boolean as value. If the value is false, the split-pane will be disabled, ie. the side pane will never be displayed. the enable input property default&#39;s to true. </content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/8312605842519235809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=8312605842519235809&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8312605842519235809'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/8312605842519235809'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/08/how-to-implement-split-pane-in-ionic-2.html' title='How to Implement Split Pane in Ionic 2 &amp; ionic 3'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-ITg3Jdys7r8/WaLIbIt6HNI/AAAAAAAAAh0/Ilp37hRhDUMCwKEQ9S9XUDVi3q5jaMl6gCLcBGAs/s72-c/splitscreenionic%2B1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-4634144278059563487</id><published>2017-07-05T04:07:00.000-07:00</published><updated>2017-07-05T04:07:51.831-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2 Events"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic Events"/><category scheme="http://www.blogger.com/atom/ns#" term="Publishing and Subscribing to Events"/><title type='text'>How to Pass Data from One Component  to Another  Component without Navigating to the Other Page.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-Tiv1LiiMs6I/WVsraSJubWI/AAAAAAAAAgU/27od_ZlO94Il12M01_V-ZRQsRpBHSbJSQCLcBGAs/s1600/How%2Bto%2BPass%2BData%2Bfrom%2BOne%2BComponent%2B%2Bto%2BAnother%2B%2BComponent%2Bwithout%2BNavigating%2Bto%2Bthe%2BOther%2BPage.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;360&quot; src=&quot;https://3.bp.blogspot.com/-Tiv1LiiMs6I/WVsraSJubWI/AAAAAAAAAgU/27od_ZlO94Il12M01_V-ZRQsRpBHSbJSQCLcBGAs/s640/How%2Bto%2BPass%2BData%2Bfrom%2BOne%2BComponent%2B%2Bto%2BAnother%2B%2BComponent%2Bwithout%2BNavigating%2Bto%2Bthe%2BOther%2BPage.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt; You May have alread Come or may Come Across situation when building your ionic mobile application, where you’ll probably want to fire an event in one of your component and have that event handled in another component.  To tackle this Ionic 2 has provided us with &quot;Events&quot;, which allows you to Subscribe to an event in one component, that have been Published in another component. Once the Event is Published it can be Subscribed on multiple Components.  This Post explain&#39;s on how to publish an Event and also Subscribe to it.  first, as usual create an ionic project  &lt;blockquote&gt;Copy and paste the below command&lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;ionic start ExampleProject sidemenu --v2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; it can be blank or tabs project your wish..  next, create a Component with name &quot;changes&quot; as follows.  &lt;blockquote&gt; Copy and paste the below command &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;ionic generate page changes&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; after the component is created, import the page in app.modle.ts  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;   import { ChangesPage } from &#39;../pages/changes/changes&#39;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; next, add &quot;ChangesPage&quot; to NgModule&#39;s declarations as well as bootstrap&#39;s entryComponents. after modifying, app.module.ts will look something like this.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; import { BrowserModule } from &#39;@angular/platform-browser&#39;;&lt;br /&gt; import { ErrorHandler, NgModule } from &#39;@angular/core&#39;;&lt;br /&gt; import { IonicApp, IonicErrorHandler, IonicModule } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt; import { MyApp } from &#39;./app.component&#39;;&lt;br /&gt; import { HomePage } from &#39;../pages/home/home&#39;;&lt;br /&gt; import { ListPage } from &#39;../pages/list/list&#39;;&lt;br /&gt; import { ChangesPage } from &#39;../pages/changes/changes&#39;;&lt;br /&gt;&lt;br /&gt; import { StatusBar } from &#39;@ionic-native/status-bar&#39;;&lt;br /&gt; import { SplashScreen } from &#39;@ionic-native/splash-screen&#39;;&lt;br /&gt;&lt;br /&gt; @NgModule({&lt;br /&gt;   declarations: [&lt;br /&gt;     MyApp,&lt;br /&gt;     HomePage,&lt;br /&gt;     ListPage,&lt;br /&gt;     ChangesPage&lt;br /&gt;   ],&lt;br /&gt;   imports: [&lt;br /&gt;     BrowserModule,&lt;br /&gt;     IonicModule.forRoot(MyApp),&lt;br /&gt;   ],&lt;br /&gt;   bootstrap: [IonicApp],&lt;br /&gt;   entryComponents: [&lt;br /&gt;     MyApp,&lt;br /&gt;     HomePage,&lt;br /&gt;     ListPage,&lt;br /&gt;     ChangesPage&lt;br /&gt;   ],&lt;br /&gt;   providers: [&lt;br /&gt;     StatusBar,&lt;br /&gt;     SplashScreen,&lt;br /&gt;     {provide: ErrorHandler, useClass: IonicErrorHandler}&lt;br /&gt;   ]&lt;br /&gt; })&lt;br /&gt; export class AppModule {}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;    Now open changes.html file in changes foder.  &lt;blockquote&gt; Copy and paste the below code &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt; &amp;lt;ion-content&amp;gt;&lt;br /&gt;     &amp;lt;ion-list&amp;gt;&lt;br /&gt;       &amp;lt;ion-item *ngFor=&amp;quot;let item of list&amp;quot;&amp;gt;&lt;br /&gt;       &amp;lt;ion-grid&amp;gt;&lt;br /&gt;       &amp;lt;ion-row&amp;gt;&lt;br /&gt;          &amp;lt;ion-col col-2&amp;gt;&lt;br /&gt;            {{item.id}}&lt;br /&gt;         &amp;lt;/ion-col&amp;gt;&lt;br /&gt;         &amp;lt;ion-col col-8&amp;gt;&lt;br /&gt;           {{item.name}}&lt;br /&gt;         &amp;lt;/ion-col&amp;gt;&lt;br /&gt;       &amp;lt;/ion-row&amp;gt;&lt;br /&gt;  &amp;lt;/ion-grid&amp;gt;       &lt;br /&gt;       &amp;lt;/ion-item&amp;gt;&lt;br /&gt;     &amp;lt;/ion-list&amp;gt;&lt;br /&gt;&amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;   Open changes.ts file and paste the below ts code.  &lt;blockquote&gt; Copy and paste the below ts code &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; import { Component } from &#39;@angular/core&#39;;&lt;br /&gt; import { NavController, NavParams } from &#39;ionic-angular&#39;;&lt;br /&gt; import { Events } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; @Component({&lt;br /&gt;   selector: &#39;page-changes&#39;,&lt;br /&gt;   templateUrl: &#39;changes.html&#39;,&lt;br /&gt; })&lt;br /&gt; export class ChangesPage {&lt;br /&gt;   list:any=[];&lt;br /&gt;   constructor(public navCtrl: NavController, public navParams: NavParams,public events: Events) {&lt;br /&gt;    this.list = [{name:&quot;vinay&quot;,id:1},{name:&quot;kumar&quot;,id:2},{name:&quot;ravi&quot;,id:3},{name:&quot;naveen&quot;,id:4}]&lt;br /&gt;     this.events.subscribe(&#39;userObj&#39;,data =&gt; {&lt;br /&gt;     let mydata = data;&lt;br /&gt;     this.list.push(mydata);&lt;br /&gt;     console.log(&quot;list&quot;,this.list)&lt;br /&gt;     this.myalert(mydata);&lt;br /&gt;   });&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   ionViewDidLoad() {&lt;br /&gt;     console.log(&#39;ionViewDidLoad ChangesPage&#39;);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   myalert(mydata){&lt;br /&gt;    alert(&#39;Added new record with name &#39;+mydata.name+&#39; &amp;with id &#39;+mydata.id);&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;   Since our work in changes Component is over lets head over to home page. open home.html and replace the html with below html code.  &lt;blockquote&gt; Copy and paste the below html code &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt; &amp;lt;ion-header&amp;gt;&lt;br /&gt;   &amp;lt;ion-navbar&amp;gt;&lt;br /&gt;     &amp;lt;button ion-button menuToggle&amp;gt;&lt;br /&gt;       &amp;lt;ion-icon name=&amp;quot;menu&amp;quot;&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;     &amp;lt;/button&amp;gt;&lt;br /&gt;     &amp;lt;ion-title&amp;gt;Home&amp;lt;/ion-title&amp;gt;&lt;br /&gt;   &amp;lt;/ion-navbar&amp;gt;&lt;br /&gt; &amp;lt;/ion-header&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;ion-content padding&amp;gt;&lt;br /&gt;   &amp;lt;ion-item&amp;gt;&lt;br /&gt;     &amp;lt;ion-label color=&amp;quot;primary&amp;quot; floating&amp;gt;Name&amp;lt;/ion-label&amp;gt;&lt;br /&gt;     &amp;lt;ion-input [(ngModel)]=&amp;quot;Obj.name&amp;quot; &amp;gt;&amp;lt;/ion-input&amp;gt;&lt;br /&gt;   &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;ion-item&amp;gt;&lt;br /&gt;     &amp;lt;ion-label color=&amp;quot;primary&amp;quot; floating&amp;gt;Id&amp;lt;/ion-label&amp;gt;&lt;br /&gt;     &amp;lt;ion-input [(ngModel)]=&amp;quot;Obj.id&amp;quot; &amp;gt;&amp;lt;/ion-input&amp;gt;&lt;br /&gt;   &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;button ion-button full secondary  (click) = &amp;quot;addObject(Obj)&amp;quot;&amp;gt;Add User&amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;page-changes&amp;gt;&amp;lt;/page-changes&amp;gt;&lt;br /&gt; &amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; next replace code in you home.ts with the below code  &lt;blockquote&gt; Copy and paste the below ts code &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; import { Component } from &#39;@angular/core&#39;;&lt;br /&gt; import { NavController, NavParams } from &#39;ionic-angular&#39;;&lt;br /&gt; import { Events } from &#39;ionic-angular&#39;;&lt;br /&gt; import { ChangesPage } from &#39;../changes/changes&#39;;&lt;br /&gt;&lt;br /&gt; @Component({&lt;br /&gt;   selector: &#39;page-home&#39;,&lt;br /&gt;   templateUrl: &#39;home.html&#39;&lt;br /&gt; })&lt;br /&gt; export class HomePage {&lt;br /&gt;&lt;br /&gt;   Obj:any = {name:&quot;&quot;,id:0};&lt;br /&gt;     constructor(public navCtrl: NavController, public navParams: NavParams,public events: Events) {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   ionViewDidLoad() {&lt;br /&gt;     console.log(&#39;ionViewDidLoad EventsPage&#39;);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   addObject(Obj) {&lt;br /&gt;     this.events.publish(&#39;userObj&#39;,Obj);&lt;br /&gt;     this.Obj = {name:&quot;&quot;,id:0}&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-Spw0tOlJ4N0/WVzHrxr6HfI/AAAAAAAAAgs/hN8Vz9r_2lgEs9T2_BwLt0VaZcSdrEEqgCLcBGAs/s1600/events.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-Spw0tOlJ4N0/WVzHrxr6HfI/AAAAAAAAAgs/hN8Vz9r_2lgEs9T2_BwLt0VaZcSdrEEqgCLcBGAs/s400/events.JPG&quot; width=&quot;228&quot; height=&quot;400&quot; data-original-width=&quot;331&quot; data-original-height=&quot;580&quot; /&gt;&lt;/a&gt;&lt;/div&gt; run the project now, you can see that the record you entered in the input will be updates in other component.  &lt;blockquote&gt; Code Explanation &lt;/blockquote&gt;  In home.html i&#39;ve added &quot;&lt;page-changes&gt;&quot; element at the bottom, which is of ChangesPage Component&#39;s selector.   what this does is it displays the ChangesPage view here in HomePage Component.   to use Events we need to import Events class so, In home.ts i&#39;ve impoerted the class ie:  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  import {Events} from ‘ionic-angular‘;&lt;br /&gt;  ...&lt;br /&gt;  constructor(public events: Events) { }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  &quot;this.events.publish&quot; is used to publish, so i&#39;ve used &quot;userObj&quot; as  publish name and send the data object &quot;obj&quot; when new record is entered when addObject() method is called.   &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;   addObject(Obj) {&lt;br /&gt;     this.events.publish(&#39;userObj&#39;,Obj);&lt;br /&gt;     this.Obj = {name:&quot;&quot;,id:0}&lt;br /&gt;   }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;  since we have published the event all is left is to subscibe to the event where we want the changes to take place.   so in this example i&#39;ve subscribed to event in ChangesPage component to push the record in list object.   &quot;this.events.subscribe&quot; is used to subscribe to an event.    &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;   this.events.subscribe(&#39;userObj&#39;,data =&gt; {&lt;br /&gt;     let mydata = data;&lt;br /&gt;     this.list.push(mydata);&lt;br /&gt;     console.log(&quot;list&quot;,this.list)&lt;br /&gt;     this.myalert(mydata);&lt;br /&gt;   });;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-liEEHykHmPU/WVzHr6YQY8I/AAAAAAAAAgw/hfpF1DW0MXEcA5haoDBVroU04d0wLtluwCLcBGAs/s1600/MyEvent.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-liEEHykHmPU/WVzHr6YQY8I/AAAAAAAAAgw/hfpF1DW0MXEcA5haoDBVroU04d0wLtluwCLcBGAs/s400/MyEvent.gif&quot; width=&quot;226&quot; height=&quot;400&quot; data-original-width=&quot;328&quot; data-original-height=&quot;580&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt;    </content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/4634144278059563487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=4634144278059563487&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4634144278059563487'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/4634144278059563487'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/07/how-to-pass-data-from-one-component-to.html' title='How to Pass Data from One Component  to Another  Component without Navigating to the Other Page.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-Tiv1LiiMs6I/WVsraSJubWI/AAAAAAAAAgU/27od_ZlO94Il12M01_V-ZRQsRpBHSbJSQCLcBGAs/s72-c/How%2Bto%2BPass%2BData%2Bfrom%2BOne%2BComponent%2B%2Bto%2BAnother%2B%2BComponent%2Bwithout%2BNavigating%2Bto%2Bthe%2BOther%2BPage.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-7564675923275035039</id><published>2017-07-02T23:08:00.000-07:00</published><updated>2017-07-03T05:36:44.680-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic popover"/><category scheme="http://www.blogger.com/atom/ns#" term="popover"/><category scheme="http://www.blogger.com/atom/ns#" term="popover onDidDismiss"/><title type='text'>How to get Data From a Popover to Your Component using onDismiss</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-rqlOSpmS9kQ/WVnaiOj10xI/AAAAAAAAAfM/OjWCeRpMMhgP7RdDtBpr3KPb9iU7jWLmQCPcBGAYYCw/s1600/How%2Bto%2Bget%2BData%2BFrom%2Ba%2BPopover%2Bto%2BYour%2BComponent%2Busing%2BonDismiss.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;360&quot; src=&quot;https://4.bp.blogspot.com/-rqlOSpmS9kQ/WVnaiOj10xI/AAAAAAAAAfM/OjWCeRpMMhgP7RdDtBpr3KPb9iU7jWLmQCPcBGAYYCw/s640/How%2Bto%2Bget%2BData%2BFrom%2Ba%2BPopover%2Bto%2BYour%2BComponent%2Busing%2BonDismiss.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Sometimes you come may acrosss a situation where we want to have more options on a particular page in ionic app, that&#39;s where ionic Popover come&#39;s into action, Popover is a dialog that appears on top of the current view. It can be used for anything, but generally it is used for showing options on top of present view if options does&#39;nt fit in the navigation bar.  In this post i&#39;m going to take you through, on how to integrate basic Popover in your ionic application , pass data from present page to Popover and also capture data from callbacks when popover is dismissed.  &lt;br /&gt;&lt;blockquote&gt;Create a ionic tab project &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;&lt;br /&gt;ionic start myPopoverApp tabs --v2&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;blockquote&gt;Create a new ionic page  &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;ionic generate page presentpop&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; Once the page is created, Open presentpop.html file in presentpop folder.  &lt;br /&gt;&lt;blockquote&gt;Copy and Paste Below html in presentpop.html file. &lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-header&amp;gt;&lt;br /&gt;  &amp;lt;ion-navbar&amp;gt;&lt;br /&gt;      &amp;lt;button ion-button menuToggle&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;quot;menu&amp;quot;&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;    &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;ion-title&amp;gt;Popover&amp;lt;/ion-title&amp;gt;&lt;br /&gt;    &amp;lt;ion-buttons end&amp;gt;&lt;br /&gt;      &amp;lt;button ion-button icon-only (click)=&amp;quot;presentPopover($event)&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;ion-icon name=&amp;quot;more&amp;quot;&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;      &amp;lt;/button&amp;gt;&lt;br /&gt;    &amp;lt;/ion-buttons&amp;gt;&lt;br /&gt;  &amp;lt;/ion-navbar&amp;gt;&lt;br /&gt;&amp;lt;/ion-header&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ion-content padding&amp;gt;&lt;br /&gt;  &amp;lt;ion-list no-border&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-list-header&amp;gt;&lt;br /&gt;      Classes&lt;br /&gt;    &amp;lt;/ion-list-header&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;planet&amp;#039; item-start&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;      Astronomy&lt;br /&gt;      &amp;lt;ion-note item-end&amp;gt;&lt;br /&gt;      To the moon&lt;br /&gt;      &amp;lt;/ion-note&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item&amp;gt;&lt;br /&gt;      &amp;lt;ion-toggle checked=&amp;quot;false&amp;quot;&amp;gt;&amp;lt;/ion-toggle&amp;gt;&lt;br /&gt;      &amp;lt;ion-label&amp;gt;&lt;br /&gt;        Muggle Studies&lt;br /&gt;      &amp;lt;/ion-label&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;body&amp;#039; item-start&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;leaf&amp;#039; item-start&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;      Herbology&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;rose&amp;#039; item-end color=&amp;quot;secondary&amp;quot;&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;flask&amp;#039; item-start&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;      Potions&lt;br /&gt;      &amp;lt;ion-note item-end&amp;gt;&lt;br /&gt;      Poisonous&lt;br /&gt;      &amp;lt;/ion-note&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item&amp;gt;&lt;br /&gt;      &amp;lt;ion-icon name=&amp;#039;add-circle&amp;#039; item-start&amp;gt;&amp;lt;/ion-icon&amp;gt;&lt;br /&gt;      Selected&lt;br /&gt;      &amp;lt;ion-note item-end style=&amp;quot;color: #00BCD4;font-weight: 600;&amp;quot;&amp;gt;&lt;br /&gt;      {{selectedData.title}}&lt;br /&gt;      &amp;lt;/ion-note&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;  &amp;lt;/ion-list&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; Now, Open presentpop.ts file in presentpop folder.   &lt;br /&gt;&lt;blockquote&gt;Copy and Paste Below code in presentpop.ts file. &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; import { Component } from &#39;@angular/core&#39;;&lt;br /&gt; import { NavController, NavParams} from &#39;ionic-angular&#39;;&lt;br /&gt; import { PopoverController } from &#39;ionic-angular&#39;;&lt;br /&gt; import { PopoverPage } from &#39;../popover/popover&#39;;&lt;br /&gt;&lt;br /&gt; @Component({&lt;br /&gt;   selector: &#39;page-presentpop&#39;,&lt;br /&gt;   templateUrl: &#39;presentpop.html&#39;,&lt;br /&gt; })&lt;br /&gt; export class PresentpopPage {&lt;br /&gt;   selectedData:any = {title:&quot;None Selected&quot;,id:0};&lt;br /&gt;   constructor(public navCtrl: NavController, public navParams: NavParams,public popoverCtrl: PopoverController) {&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   ionViewDidLoad() {&lt;br /&gt;     console.log(&#39;ionViewDidLoad PresentpopPage&#39;);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   presentPopover(ev) {&lt;br /&gt;     let listData = [{title:&quot;Settings&quot;,id:1},{title:&quot;Logout&quot;,id:2},{title:&quot;Profile&quot;,id:3},{title:&quot;Help&quot;,id:4}]&lt;br /&gt;     let popover = this.popoverCtrl.create(PopoverPage, { listData });&lt;br /&gt;&lt;br /&gt;     popover.present({&lt;br /&gt;       ev: ev&lt;br /&gt;     });&lt;br /&gt;&lt;br /&gt;     popover.onDidDismiss(data =&gt; {&lt;br /&gt;      console.log(data);&lt;br /&gt;      if(data!=null){&lt;br /&gt;         this.selectedData = data&lt;br /&gt;      }&lt;br /&gt;    })&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-sBJuajcSd5E/WVowx5knRlI/AAAAAAAAAfk/3X_kTFKtepw-FcMNPJ2gqPx8ccaj4pF8ACLcBGAs/s1600/popover1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;552&quot; data-original-width=&quot;328&quot; height=&quot;400&quot; src=&quot;https://4.bp.blogspot.com/-sBJuajcSd5E/WVowx5knRlI/AAAAAAAAAfk/3X_kTFKtepw-FcMNPJ2gqPx8ccaj4pF8ACLcBGAs/s400/popover1.JPG&quot; width=&quot;236&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;Now, lets create the popover template.  &lt;br /&gt;&lt;blockquote&gt;Create a new ionic page  &lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;ionic generate page popover&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;Once the popover page is created, Open popover.html file in popover folder.  &lt;br /&gt;&lt;blockquote&gt;Copy and Paste Below html in popover.html file. &lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-content &amp;gt;&lt;br /&gt;    &amp;lt;ion-list&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;ion-item *ngFor=&amp;quot;let item of items&amp;quot; (click)=&amp;quot;dismiss(item)&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;ion-label&amp;gt;{{item.title}}&amp;lt;/ion-label&amp;gt; &lt;br /&gt;      &amp;lt;/ion-item&amp;gt;&lt;br /&gt;    &amp;lt;/ion-list&amp;gt;&lt;br /&gt;&amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; Now, Open popover.ts file in popover folder.   &lt;br /&gt;&lt;blockquote&gt;Copy and Paste Below code in popover.ts file. &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;import { NavController, NavParams,ViewController } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt;@Component({&lt;br /&gt;  selector: &#39;page-popover&#39;,&lt;br /&gt;  templateUrl: &#39;popover.html&#39;,&lt;br /&gt;})&lt;br /&gt;export class PopoverPage {&lt;br /&gt;   items:any;&lt;br /&gt;  constructor(public navCtrl: NavController, public navParams: NavParams,public viewCtrl: ViewController) {&lt;br /&gt;    this.items = this.navParams.get(&#39;listData&#39;);&lt;br /&gt;    console.log(this.items)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ionViewDidLoad() {&lt;br /&gt;    console.log(&#39;ionViewDidLoad PopoverPage&#39;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  dismiss(item) {&lt;br /&gt;    let data = item;&lt;br /&gt;    this.viewCtrl.dismiss(data);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-4OJm7iZP6Ns/WVowx3MNJbI/AAAAAAAAAfs/6TksKWNWRSsBeCmRZgJx13rfU6VBLUgNACLcBGAs/s1600/popover2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;554&quot; data-original-width=&quot;329&quot; height=&quot;400&quot; src=&quot;https://3.bp.blogspot.com/-4OJm7iZP6Ns/WVowx3MNJbI/AAAAAAAAAfs/6TksKWNWRSsBeCmRZgJx13rfU6VBLUgNACLcBGAs/s400/popover2.JPG&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;Above Code Explanation. &lt;/blockquote&gt;The presentPopover($event) method is the one which initializes the popover. the $event parameter helps in positioning the popover on the clicked area.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; this.popoverCtrl.create(PopoverPage, { listData })&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; the above line creates a popover using Popover.html and also sends &quot;listData&quot; data to the respective popover to display as list.  once the data is send to &quot;PopoverPage&quot;, the data ie &quot;listData&quot; is to be displayed as a list in popover. to do that we should first fetch the data that is sent from &quot;PresentpopPage&quot;. this can be achieved by &quot;NavParams&quot;, ionic NavParams catches helps in fetching the data from other pages from which the present page is launched.  below code fetches the data from &quot;PopoverPage&quot;.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;    this.items = this.navParams.get(&#39;listData&#39;);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; Once the Data is fetched the variable containing the fetched data, is used in *ngFor to loop data.  &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;ion-item *ngFor=&amp;quot;let item of items&amp;quot; (click)=&amp;quot;dismiss(item)&amp;quot;&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; the dismiss() method is used to close popover.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;  dismiss(item) {&lt;br /&gt;    let data = item;&lt;br /&gt;    this.viewCtrl.dismiss(data);&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; viewCtrl.dismiss method will close the popover, and also sends provided data as callback to the parent page from which the popover is launched. ie in our case &quot;PresentpopPage&quot;.  The data that is send as callback, should be fetched right?. onDidDismiss() function of Popover catches the callback once the popover is dismissed.  &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;   popover.onDidDismiss(data =&gt; {&lt;br /&gt;     console.log(data);&lt;br /&gt;     if(data!=null){&lt;br /&gt;        this.selectedData = data&lt;br /&gt;     }&lt;br /&gt;   })&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-2711jmhINn4/WVowx4Q1mvI/AAAAAAAAAfo/JpsRxBThZHA2XHXmOZrWDUiSG7e4jwOPACLcBGAs/s1600/popover3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;552&quot; data-original-width=&quot;330&quot; height=&quot;400&quot; src=&quot;https://2.bp.blogspot.com/-2711jmhINn4/WVowx4Q1mvI/AAAAAAAAAfo/JpsRxBThZHA2XHXmOZrWDUiSG7e4jwOPACLcBGAs/s400/popover3.JPG&quot; width=&quot;238&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;the fetched data is assigned to &quot;selectedData&quot;, you can see that the data changes when item is selected in popover on the browser.  &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-EDPr81vidzU/WVowzWqB5KI/AAAAAAAAAfw/7TabX0KWZg0DXml2dng-EfW9kvs6AN_pwCLcBGAs/s1600/popover4.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;580&quot; data-original-width=&quot;328&quot; height=&quot;400&quot; src=&quot;https://2.bp.blogspot.com/-EDPr81vidzU/WVowzWqB5KI/AAAAAAAAAfw/7TabX0KWZg0DXml2dng-EfW9kvs6AN_pwCLcBGAs/s400/popover4.gif&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/7564675923275035039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=7564675923275035039&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7564675923275035039'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7564675923275035039'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/07/how-to-get-data-from-popover-to-your.html' title='How to get Data From a Popover to Your Component using onDismiss'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-rqlOSpmS9kQ/WVnaiOj10xI/AAAAAAAAAfM/OjWCeRpMMhgP7RdDtBpr3KPb9iU7jWLmQCPcBGAYYCw/s72-c/How%2Bto%2Bget%2BData%2BFrom%2Ba%2BPopover%2Bto%2BYour%2BComponent%2Busing%2BonDismiss.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-6937978672204620026</id><published>2017-07-02T07:29:00.002-07:00</published><updated>2017-07-03T05:42:43.319-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="date picker"/><category scheme="http://www.blogger.com/atom/ns#" term="ion-datetime"/><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic 2"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic framework"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><title type='text'>How to Integrate DatePicker in Ionic 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-nEkLip7hf8U/WVj0AF4-DjI/AAAAAAAAAeo/WvAQZxZoC1YcqKIMnIwap8WC8fbF5S_bwCLcBGAs/s1600/datepicker%2Bpage%2B2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;741&quot; data-original-width=&quot;423&quot; height=&quot;640&quot; src=&quot;https://4.bp.blogspot.com/-nEkLip7hf8U/WVj0AF4-DjI/AAAAAAAAAeo/WvAQZxZoC1YcqKIMnIwap8WC8fbF5S_bwCLcBGAs/s640/datepicker%2Bpage%2B2.JPG&quot; width=&quot;363&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Integrating DatePicker  into an Ionic 2  application is fairly easy. this post cover&#39;s on how to integrate/implement DatePicker in an ionic 2 application. I assume you have already created an ionic project.  &lt;br /&gt;&lt;blockquote&gt; Run the Following Command to create a new page in ionic project  &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt; ionic generate page datePicker&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; see the below image for reference.  &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-ctz-o0G8hQ8/WVj0AGsVNtI/AAAAAAAAAes/OQ9jnPW9S-k2Ab6Q05jEsbKcPbPIYIP6QCLcBGAs/s1600/datepicker%2Bpage.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;341&quot; data-original-width=&quot;676&quot; height=&quot;321&quot; src=&quot;https://2.bp.blogspot.com/-ctz-o0G8hQ8/WVj0AGsVNtI/AAAAAAAAAes/OQ9jnPW9S-k2Ab6Q05jEsbKcPbPIYIP6QCLcBGAs/s640/datepicker%2Bpage.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Once the page is created, open the date-picker.ts file in date-picker folder.  &lt;br /&gt;&lt;blockquote&gt;Copy &amp;amp; Pase the Below code in your date-picker.ts file &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&lt;br /&gt;import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;import { NavController, NavParams } from &#39;ionic-angular&#39;;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;  Generated class for the DatePicker page.&lt;br /&gt;&lt;br /&gt;  See http://ionicframework.com/docs/v2/components/#navigation for more info on&lt;br /&gt;  Ionic pages and navigation.&lt;br /&gt;*/&lt;br /&gt;@Component({&lt;br /&gt;  selector: &#39;page-date-picker&#39;,&lt;br /&gt;  templateUrl: &#39;date-picker.html&#39;&lt;br /&gt;})&lt;br /&gt;export class DatePickerPage {&lt;br /&gt;  event = { title:&#39;&#39;,location:&#39;&#39;,timeStarts: &#39;&#39;,timeEnds: &#39;&#39;,startDate:&#39;&#39;,endDate:&#39;&#39;}&lt;br /&gt;  eventList:any=[];&lt;br /&gt;  constructor(public navCtrl: NavController, public navParams: NavParams) {}&lt;br /&gt;&lt;br /&gt;  ionViewDidLoad() {&lt;br /&gt;    console.log(&#39;ionViewDidLoad DatePickerPage&#39;);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  saveData(event){&lt;br /&gt;     console.log(&quot;event&quot;,event)&lt;br /&gt;     this.eventList.push(event)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt; &lt;blockquote&gt;Copy &amp;amp; paste the below html code to date-picker.html  &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;  Generated template for the DatePicker page.&lt;br /&gt;&lt;br /&gt;  See http://ionicframework.com/docs/v2/components/#navigation for more info on&lt;br /&gt;  Ionic pages and navigation.&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;ion-header&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ion-navbar&amp;gt;&lt;br /&gt;    &amp;lt;ion-title&amp;gt;datePicker&amp;lt;/ion-title&amp;gt;&lt;br /&gt;  &amp;lt;/ion-navbar&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ion-header&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ion-content padding&amp;gt;&lt;br /&gt;  &amp;lt;ion-list&amp;gt;&lt;br /&gt;    &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-input placeholder=&quot;Title&quot;  [(ngModel)]=&quot;event.title&quot;&amp;gt;&amp;lt;/ion-input&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;    &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-input placeholder=&quot;Location&quot;  [(ngModel)]=&quot;event.location&quot;&amp;gt;&amp;lt;/ion-input&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;  &amp;lt;/ion-list&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ion-list&amp;gt;&lt;br /&gt;    &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-label&amp;gt;Start Date&amp;lt;/ion-label&amp;gt;&lt;br /&gt;      &amp;lt;ion-datetime displayFormat=&quot;MMM DD YYYY&quot; [(ngModel)]=&quot;event.startDate&quot;&amp;gt;&amp;lt;/ion-datetime&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-label&amp;gt;Start Time&amp;lt;/ion-label&amp;gt;&lt;br /&gt;      &amp;lt;ion-datetime displayFormat=&quot;h:mm A&quot; pickerFormat=&quot;h mm A&quot; [(ngModel)]=&quot;event.timeStarts&quot;&amp;gt;&amp;lt;/ion-datetime&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-label&amp;gt;End Date&amp;lt;/ion-label&amp;gt;&lt;br /&gt;      &amp;lt;ion-datetime displayFormat=&quot;MMM DD YYYY&quot; [(ngModel)]=&quot;event.endDate&quot;&amp;gt;&amp;lt;/ion-datetime&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;ion-item class=&quot;customBorder&quot;&amp;gt;&lt;br /&gt;      &amp;lt;ion-label&amp;gt;End Time&amp;lt;/ion-label&amp;gt;&lt;br /&gt;      &amp;lt;ion-datetime displayFormat=&quot;h:mm A&quot; pickerFormat=&quot;h mm A&quot; [(ngModel)]=&quot;event.timeEnds&quot;&amp;gt;&amp;lt;/ion-datetime&amp;gt;&lt;br /&gt;    &amp;lt;/ion-item&amp;gt;&lt;br /&gt;   &lt;br /&gt;  &amp;lt;/ion-list&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;button ion-button full (click)=&quot;saveData(event)&quot;&amp;gt;Save&amp;lt;/button&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ion-list&amp;gt;&lt;br /&gt;  &amp;lt;div ion-item *ngFor=&quot;let item of eventList&quot; (click)=&quot;itemSelected(item)&quot; style=&quot;background-color: #dadada;&quot;&amp;gt;&lt;br /&gt; &amp;lt;ion-card &amp;gt;&lt;br /&gt;  &amp;lt;ion-card-header&amp;gt;&lt;br /&gt;    {{item.title}}&lt;br /&gt;  &amp;lt;/ion-card-header&amp;gt;&lt;br /&gt;  &amp;lt;ion-card-content&amp;gt;&lt;br /&gt;  {{item.location}}  &lt;br /&gt;  &amp;lt;/ion-card-content&amp;gt;&lt;br /&gt;&amp;lt;/ion-card&amp;gt;&lt;br /&gt;    &amp;lt;ion-row no-padding&amp;gt;&lt;br /&gt;      &amp;lt;ion-col&amp;gt;&lt;br /&gt;        &amp;lt;button ion-button clear small color=&quot;danger&quot; icon-start&amp;gt;&lt;br /&gt;            Start Date: &lt;br /&gt;            {{item.startDate}}          &lt;br /&gt;        &amp;lt;/button&amp;gt;&lt;br /&gt;      &amp;lt;/ion-col&amp;gt;&lt;br /&gt;      &amp;lt;ion-col text-center&amp;gt;&lt;br /&gt;        &amp;lt;button ion-button clear small color=&quot;danger&quot; icon-start&amp;gt;&lt;br /&gt;            EndDate:        &lt;br /&gt;           {{item.endDate}}&lt;br /&gt;        &amp;lt;/button&amp;gt;&lt;br /&gt;      &amp;lt;/ion-col&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/ion-row&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;  &lt;br /&gt;&amp;lt;/ion-list&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; &lt;blockquote&gt; Copy &amp;amp; Pase the Below css in your date-picker.scss file  &lt;/blockquote&gt; &lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;br /&gt;.customBorder{&lt;br /&gt;  border: 1px solid #7fabf7 !important;&lt;br /&gt;  margin-top: 5px;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; after the application is finished building, your app date-picker page view will look as follows.  &lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-J8IWwiSzDuk/WVj0AjseReI/AAAAAAAAAew/LxtPsXYjWuQOe1GjeNbU5t845DOYgxVdACLcBGAs/s1600/datepicker.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;736&quot; data-original-width=&quot;414&quot; height=&quot;640&quot; src=&quot;https://2.bp.blogspot.com/-J8IWwiSzDuk/WVj0AjseReI/AAAAAAAAAew/LxtPsXYjWuQOe1GjeNbU5t845DOYgxVdACLcBGAs/s640/datepicker.gif&quot; width=&quot;360&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/6937978672204620026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=6937978672204620026&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6937978672204620026'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/6937978672204620026'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/07/how-to-integrate-datepicker-in-ionic-2.html' title='How to Integrate DatePicker in Ionic 2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://4.bp.blogspot.com/-nEkLip7hf8U/WVj0AF4-DjI/AAAAAAAAAeo/WvAQZxZoC1YcqKIMnIwap8WC8fbF5S_bwCLcBGAs/s72-c/datepicker%2Bpage%2B2.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-7110130428384685117</id><published>2017-03-08T08:07:00.001-08:00</published><updated>2017-07-05T05:14:08.840-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ionic and mapbox"/><category scheme="http://www.blogger.com/atom/ns#" term="Mapbox"/><category scheme="http://www.blogger.com/atom/ns#" term="Mapbox GL JS"/><category scheme="http://www.blogger.com/atom/ns#" term="mapbox maps"/><category scheme="http://www.blogger.com/atom/ns#" term="maps"/><title type='text'>Integrating MapBox GL JS  map into an Ionic 2 Application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Integrating MapBox GL JS map into an Ionic 2 &amp;nbsp;application is similar to that of &amp;nbsp;my previous blog post&amp;nbsp;&lt;a href=&quot;http://gowriter.blogspot.in/2017/02/how-to-integrate-mapbox-gl-js-maps-with.html&quot; target=&quot;_blank&quot;&gt;How to Integrate Mapbox GL JS maps with an Ionic application&lt;/a&gt;&amp;nbsp;, but with small changes.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In this tutorial i am going to explain how to integrate mapbox gl js map into ionic 2 application.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: initial; border-image: initial; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the Following Command to create a new ionic project&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 15px; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt; ionic start Mapbox-Gl-maps tabs --v2 &lt;/code&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; font-size: 15px; letter-spacing: 0.21px;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;After the Project is created, navigate to the project folder, in my case &quot;Mapbox-Gl-maps&quot; is the folder name.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Since we want our app to work on Both ios and Android we should also add respective platform&#39;s to the ionic project.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; border-bottom-color: initial; border-bottom-style: initial; border-image: initial; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-right-color: initial; border-right-style: initial; border-top-color: initial; border-top-style: initial; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the following commands to add the Android &amp;amp; iOS platforms&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-css&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 15px; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-css&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;br /&gt;ionic platform add ios&lt;br /&gt;&lt;br /&gt;ionic platform add android&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now, that you have added the platform&#39;s, lets add the required plugins into our project.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add MapBox GL JS Library&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;To display the mapbox &amp;nbsp;map in our ionic 2 application, we need to import some js files in to our application. we will use npm to import required js files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the Following Command to install mapbox gl js library&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt; npm install --save-dev mapbox-gl&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add Geolocation Plugin&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;we also need geolocation plugin to get the exact location of the user.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the Following Command to install geolocation plugin&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt; cordova plugin add cordova-plugin-geolocation&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;code class=&quot; language-html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; letter-spacing: 0.015em; line-height: 1.5; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now, that you have installed the required plugin&#39;s, lets get to coding. view the app that you just created by just running the below server command.&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; letter-spacing: 0.015em; line-height: 1.5; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt; &lt;/code&gt;ionic serve&lt;/code&gt;&lt;/pre&gt;&lt;code class=&quot; language-html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; letter-spacing: 0.015em; line-height: 1.5; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;code class=&quot; language-html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; letter-spacing: 0.015em; line-height: 1.5; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; letter-spacing: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This will start a live-reload server for your project. When changes are made to any HTML, CSS, or JS files, the browser will automatically reload when the files are saved.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;your app should look like this in the browser.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-jrdFDVvDP6M/WL7etygoPGI/AAAAAAAAAdY/n6guVYJ5JDEUbYLXjbfzPgp0DXur0KGdgCLcB/s1600/basic%2Btemplate.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://1.bp.blogspot.com/-jrdFDVvDP6M/WL7etygoPGI/AAAAAAAAAdY/n6guVYJ5JDEUbYLXjbfzPgp0DXur0KGdgCLcB/s640/basic%2Btemplate.JPG&quot; width=&quot;361&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;Add the Map code to homepage&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;Add the following code to home.ts after constructor&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;br /&gt;&lt;br /&gt;     ionViewDidEnter() {&lt;br /&gt;&lt;br /&gt;       /*Initializing Map*/&lt;br /&gt;      mapboxgl.accessToken = &#39;&lt;b&gt;&amp;lt;your mapbox gl js access token&amp;gt;&lt;/b&gt;&#39;;&lt;br /&gt;      var map = new mapboxgl.Map({&lt;br /&gt;      style: &#39;mapbox://styles/mapbox/light-v9&#39;,&lt;br /&gt;      center: [-74.0066, 40.7135],&lt;br /&gt;      zoom: 16,&lt;br /&gt;      pitch: 80,&lt;br /&gt;      minZoom: 7.5, //restrict map zoom - buildings not visible beyond 13&lt;br /&gt;      maxZoom: 17,&lt;br /&gt;      container: &#39;map&#39;&lt;br /&gt;    });&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;now when your app is reloaded, you will get an error like &quot; cannot find name mapboxgl &quot;. that is because we have to imported&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;mapboxgl&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; js &amp;nbsp;to our page.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;Note&lt;/b&gt;:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: inherit; letter-spacing: 0.015em; word-spacing: normal;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;AccessToken is provided by mapbox once you signup @ https://www.mapbox.com.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;ubuntu mono&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;copy and past the below code to your home.ts file&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;import mapboxgl from &#39;mapbox-gl/dist/mapbox-gl.js&#39;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;your app should reload without any errors now. but to display map on your home page add the folloing code to your home.html file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;copy and past the below html code to your home.html file&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&amp;lt;div id=&#39;map&#39;&amp;gt;&amp;lt;/div&amp;gt; &lt;/code&gt;&lt;/pre&gt;Now you can see that the map is loaded, but the height and width need&#39;s a little modification right!&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;copy and past the below css code to your home.scss file&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;#map{&lt;br /&gt; width: 100%;&lt;br /&gt; height:100%;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;reload your app and you can see that the map perfectly adjusts to the window now as shown below.&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-no55vWnzATU/WL7qbXgmVvI/AAAAAAAAAdw/OYpwqJh9kN4sKa1nH0IAcRePeqOdS3XoQCLcB/s1600/map%2Bhome.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://2.bp.blogspot.com/-no55vWnzATU/WL7qbXgmVvI/AAAAAAAAAdw/OYpwqJh9kN4sKa1nH0IAcRePeqOdS3XoQCLcB/s640/map%2Bhome.JPG&quot; width=&quot;360&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Display 3D Buildings&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;To display 3d building on your mapbox map add the following code below the map&amp;nbsp;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;initialization&amp;nbsp;&lt;/span&gt;code.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;copy and past the below code to your home.ts file&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;    map.on(&#39;load&#39;, function() {&lt;br /&gt;        map.addLayer({&lt;br /&gt;            &#39;id&#39;: &#39;3d-buildings&#39;,&lt;br /&gt;            &#39;source&#39;: &#39;composite&#39;,&lt;br /&gt;            &#39;source-layer&#39;: &#39;building&#39;,&lt;br /&gt;            &#39;filter&#39;: [&#39;==&#39;, &#39;extrude&#39;, &#39;true&#39;],&lt;br /&gt;            &#39;type&#39;: &#39;fill-extrusion&#39;,&lt;br /&gt;            &#39;minzoom&#39;: 15,&lt;br /&gt;            &#39;paint&#39;: {&lt;br /&gt;                &#39;fill-extrusion-color&#39;: &#39;#aaa&#39;,&lt;br /&gt;                &#39;fill-extrusion-height&#39;: {&lt;br /&gt;                    &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;                    &#39;property&#39;: &#39;height&#39;&lt;br /&gt;                },&lt;br /&gt;                &#39;fill-extrusion-base&#39;: {&lt;br /&gt;                    &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;                    &#39;property&#39;: &#39;min_height&#39;&lt;br /&gt;                },&lt;br /&gt;                &#39;fill-extrusion-opacity&#39;: .6&lt;br /&gt;            }&lt;br /&gt;        });&lt;br /&gt;    }); &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;after your app is reloaded you can see that the mapbox map loads map with 3d buildings as shown below.&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-RlRyw-hS0tI/WL7rPsZMvmI/AAAAAAAAAd0/XJaS7FJUY-wfhHctXb15bxwqMTetFvAnACLcB/s1600/map%2B3d%2Bview.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://3.bp.blogspot.com/-RlRyw-hS0tI/WL7rPsZMvmI/AAAAAAAAAd0/XJaS7FJUY-wfhHctXb15bxwqMTetFvAnACLcB/s640/map%2B3d%2Bview.JPG&quot; width=&quot;358&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Get Current Location&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;As you can see i&#39;have given static coordinates to the map, to get the current location of the user/device we need the geolocation plugin that we have installed earlier and below given peace of code.&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-bottom-width: 0px; border-left: 3px solid rgb(225, 93, 93); border-right-width: 0px; border-top-width: 0px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;copy and past the below code to your home.ts file&#39;s &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;ionViewDidEnter&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;   /*Initializing geolocation*/&lt;br /&gt;  let options = {&lt;br /&gt;    frequency: 3000,&lt;br /&gt;    enableHighAccuracy: true&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;  this.watch = Geolocation.watchPosition(options)&lt;br /&gt;  .subscribe((position: Geoposition) =&amp;gt; {&lt;br /&gt;    console.log(position);&lt;br /&gt;    this.Coordinates = position.coords;&lt;br /&gt;    this.executemap()&lt;br /&gt;  }); &lt;br /&gt;&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;modify the already written code, move the map&amp;nbsp;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.225px;&quot;&gt;Initializing code from ionViewDidEnter method to executemap method and also add the below variables within HomePage class.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.225px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;ubuntu mono&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.225px;&quot;&gt;   Coordinates: any;&lt;br /&gt;   watch:any;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;replace the map code to executemap method&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; font-family: consolas, monaco, &amp;quot;andale mono&amp;quot;, &amp;quot;ubuntu mono&amp;quot;, monospace; font-size: 15px; letter-spacing: 0.015em; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt; executemap(){&lt;br /&gt;&lt;br /&gt;     /*Initializing Map*/&lt;br /&gt;     mapboxgl.accessToken = &#39;pk.eyJ1IjoidmVua2F0aXRvbiIsImEiOiJjaXhsdGZ2amIwMDQwMnFxdDdoMTZ3NHlpIn0.X9Zmsqs7wCS30_RGxa_Kzw&#39;;&lt;br /&gt;    var map = new mapboxgl.Map({&lt;br /&gt;       style: &#39;mapbox://styles/mapbox/light-v9&#39;,&lt;br /&gt;       center: [this.Coordinates.longitude, this.Coordinates.latitude],&lt;br /&gt;       zoom: 16,&lt;br /&gt;       pitch: 80,&lt;br /&gt;       minZoom: 7.5, //restrict map zoom - buildings not visible beyond 13&lt;br /&gt;       maxZoom: 17,&lt;br /&gt;       container: &#39;map&#39;&lt;br /&gt;     });&lt;br /&gt;      map.on(&#39;load&#39;, function() {&lt;br /&gt;   map.addLayer({&lt;br /&gt;    &#39;id&#39;: &#39;3d-buildings&#39;,&lt;br /&gt;    &#39;source&#39;: &#39;composite&#39;,&lt;br /&gt;    &#39;source-layer&#39;: &#39;building&#39;,&lt;br /&gt;    &#39;filter&#39;: [&#39;==&#39;, &#39;extrude&#39;, &#39;true&#39;],&lt;br /&gt;    &#39;type&#39;: &#39;fill-extrusion&#39;,&lt;br /&gt;    &#39;minzoom&#39;: 15,&lt;br /&gt;    &#39;paint&#39;: {&lt;br /&gt;     &#39;fill-extrusion-color&#39;: &#39;#aaa&#39;,&lt;br /&gt;     &#39;fill-extrusion-height&#39;: {&lt;br /&gt;      &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;      &#39;property&#39;: &#39;height&#39;&lt;br /&gt;     },&lt;br /&gt;     &#39;fill-extrusion-base&#39;: {&lt;br /&gt;      &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;      &#39;property&#39;: &#39;min_height&#39;&lt;br /&gt;     },&lt;br /&gt;     &#39;fill-extrusion-opacity&#39;: .6&lt;br /&gt;    }&lt;br /&gt;   });&lt;br /&gt;  });&lt;br /&gt; }&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Once completed your app should load with your current location coordinates.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;below is the complete code of the home.ts file&lt;/span&gt;&lt;br /&gt;&lt;blockquote style=&quot;background-color: white; border-left-color: rgb(225, 93, 93); border-left-style: solid; border-width: 0px 0px 0px 3px; box-sizing: border-box; color: #7b7b7b; font-family: sans-serif; font-style: italic; letter-spacing: 0.21px; margin: 15px 0px 20px; padding: 10px 20px 10px 30px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;copy and past the below code if you have problem&#39;s loading map&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;pre class=&quot; language-html&quot; style=&quot;background: rgb(245, 242, 240); border-radius: 0px; box-sizing: border-box; line-height: 1.5; margin-bottom: 0.5em; margin-top: 0.5em; overflow: auto; padding: 1em; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;ubuntu mono&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.225px;&quot;&gt;import { Component } from &#39;@angular/core&#39;;&lt;br /&gt;import mapboxgl from &#39;mapbox-gl/dist/mapbox-gl.js&#39;&lt;br /&gt;import { NavController } from &#39;ionic-angular&#39;;&lt;br /&gt;import { Geolocation, Geoposition} from &#39;ionic-native&#39;; &lt;br /&gt;&lt;br /&gt;@Component({&lt;br /&gt;  selector: &#39;page-home&#39;,&lt;br /&gt;  templateUrl: &#39;home.html&#39;&lt;br /&gt;})&lt;br /&gt;export class HomePage {&lt;br /&gt;  Coordinates: any;&lt;br /&gt;  watch:any;&lt;br /&gt;  constructor(public navCtrl: NavController) {&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;    ionViewDidEnter() {&lt;br /&gt;  &lt;br /&gt;   /*Initializing geolocation*/&lt;br /&gt;  let options = {&lt;br /&gt;    frequency: 3000,&lt;br /&gt;    enableHighAccuracy: true&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;  this.watch = Geolocation.watchPosition(options)&lt;br /&gt;  .subscribe((position: Geoposition) =&amp;gt; {&lt;br /&gt;    console.log(position);&lt;br /&gt;    this.Coordinates = position.coords;&lt;br /&gt;    this.executemap()&lt;br /&gt;  }); &lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt; executemap(){&lt;br /&gt;&lt;br /&gt;     /*Initializing Map*/&lt;br /&gt;     mapboxgl.accessToken = &#39;&amp;lt;your mapbox gl js access token&amp;gt;&#39;;&lt;br /&gt;    var map = new mapboxgl.Map({&lt;br /&gt;       style: &#39;mapbox://styles/mapbox/light-v9&#39;,&lt;br /&gt;       center: [this.Coordinates.longitude, this.Coordinates.latitude],&lt;br /&gt;       zoom: 16,&lt;br /&gt;       pitch: 80,&lt;br /&gt;       minZoom: 7.5, //restrict map zoom - buildings not visible beyond 13&lt;br /&gt;       maxZoom: 17,&lt;br /&gt;       container: &#39;map&#39;&lt;br /&gt;     });&lt;br /&gt;      map.on(&#39;load&#39;, function() {&lt;br /&gt;   map.addLayer({&lt;br /&gt;    &#39;id&#39;: &#39;3d-buildings&#39;,&lt;br /&gt;    &#39;source&#39;: &#39;composite&#39;,&lt;br /&gt;    &#39;source-layer&#39;: &#39;building&#39;,&lt;br /&gt;    &#39;filter&#39;: [&#39;==&#39;, &#39;extrude&#39;, &#39;true&#39;],&lt;br /&gt;    &#39;type&#39;: &#39;fill-extrusion&#39;,&lt;br /&gt;    &#39;minzoom&#39;: 15,&lt;br /&gt;    &#39;paint&#39;: {&lt;br /&gt;     &#39;fill-extrusion-color&#39;: &#39;#aaa&#39;,&lt;br /&gt;     &#39;fill-extrusion-height&#39;: {&lt;br /&gt;      &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;      &#39;property&#39;: &#39;height&#39;&lt;br /&gt;     },&lt;br /&gt;     &#39;fill-extrusion-base&#39;: {&lt;br /&gt;      &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;      &#39;property&#39;: &#39;min_height&#39;&lt;br /&gt;     },&lt;br /&gt;     &#39;fill-extrusion-opacity&#39;: .6&lt;br /&gt;    }&lt;br /&gt;   });&lt;br /&gt;  });&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;ubuntu mono&amp;quot; , monospace; font-size: 15px; letter-spacing: 0.015em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;code class=&quot; language-html&quot; style=&quot;background: 0px 0px; border-radius: 0px; box-sizing: border-box; font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: inherit; hyphens: none; letter-spacing: 0.015em; line-height: 1.5; tab-size: 4; text-shadow: rgb(255, 255, 255) 0px 1px; word-break: normal; word-spacing: normal; word-wrap: normal;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/7110130428384685117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=7110130428384685117&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7110130428384685117'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7110130428384685117'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/03/integrating-mapbox-gl-js-map-into-ionic.html' title='Integrating MapBox GL JS  map into an Ionic 2 Application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-jrdFDVvDP6M/WL7etygoPGI/AAAAAAAAAdY/n6guVYJ5JDEUbYLXjbfzPgp0DXur0KGdgCLcB/s72-c/basic%2Btemplate.JPG" height="72" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-2273871183835931784</id><published>2017-02-02T08:31:00.001-08:00</published><updated>2017-02-26T03:20:41.210-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic and mapbox"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Mapbox"/><category scheme="http://www.blogger.com/atom/ns#" term="Mapbox GL JS"/><category scheme="http://www.blogger.com/atom/ns#" term="mapbox maps"/><category scheme="http://www.blogger.com/atom/ns#" term="maps"/><title type='text'>How to Integrate Mapbox GL JS Maps with an Ionic Application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;Mapbox GL JS&lt;/b&gt; is a JavaScript library that uses WebGL to render interactive maps from vector tiles and Mapbox styles.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Mapbox&#39;s GL JS allows us to add features like Tilt, Custom Map Styles, 3D Building&#39;s etc.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In this tutorial I am going to walk you through how to integrate the  Mapbox GL JS Maps into an Ionic application.  Create a New Ionic Application&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-3ODFXtAvNas/WLK6AXcOeFI/AAAAAAAAAcI/cUSHLYws-u48xgvh1_sw7XOLO_C_W-USQCLcB/s1600/ionic%252Bmapbox.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://3.bp.blogspot.com/-3ODFXtAvNas/WLK6AXcOeFI/AAAAAAAAAcI/cUSHLYws-u48xgvh1_sw7XOLO_C_W-USQCLcB/s320/ionic%252Bmapbox.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;First things first, let’s create a new Ionic project.  For this project I&#39;m going to create an ionic blank project.  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the Following Command to create a new ionic project &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt; ionic start Mapbox-Gl-maps blank &lt;/code&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;After the Project is created, navigate to the project folder, in my case &quot;Mapbox-Gl-maps&quot; is the folder name.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Since we want our app to work on Both ios and Android we should also add respective platform&#39;s to the ionic project.&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the following commands to add the Android &amp;amp; iOS platforms &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;br /&gt;ionic platform add ios&lt;br /&gt;&lt;br /&gt;ionic platform add android&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; Add Geolocation Plugin  In this post, We are also going to Geolocate the users location on the map, so we need to install native Geolocation plugin.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Although Geolocating user works perfectly on browser, it may not work as expected on devices.  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Run the following commands to add Geolocation plugin. &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt; cordova plugin add cordova-plugin-geolocation &lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Add required JS and Css files&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Open index.html file in your project. include the following Mapbox GL JS &amp;amp; Css files just before cordova.js file. &lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;br /&gt;&amp;lt;script src=&quot;https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;link href=&quot;https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&amp;lt;/link&amp;gt;  &lt;br /&gt; &lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Create a Map in Your ionic Application  Now we’re going to look at how to display map in our ionic application. To Display map on our ionic application, add the following code below ion-pane.   &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Copy and Paste the code given below &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;      &amp;lt;ion-header-bar class=&quot;bar-dark&quot;&amp;gt;&lt;br /&gt;      &amp;lt;h1 class=&quot;title&quot;&amp;gt;MapBox Map&amp;lt;/h1&amp;gt;&lt;br /&gt;      &amp;lt;/ion-header-bar&amp;gt;&lt;br /&gt;      &amp;lt;ion-content scroll=&quot;false&quot;&amp;gt;&lt;br /&gt;       &amp;lt;div id=&#39;map&#39; style=&quot;width:{{mapwidth}}px; height:{{mapheight}}px&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;/ion-content&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;   Now assigned it a controller in app.js file. Create controller in app.js with name &quot;MapCtrl&quot;. This controller will be responsible for initialising the MapBox Map.  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add the following controller to your app.js file  &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;br /&gt;.controller(&#39;MapCtrl&#39;, function($scope) {&lt;br /&gt;&lt;br /&gt;})&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;Now that we have created our controller, lets add the code to display map on our ionic application.   &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add the following code to your MapCtrl controller in app.js file &lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;br /&gt;&lt;your access=&quot;&quot; here=&quot;&quot; token=&quot;&quot;&gt;    $scope.mapwidth = screen.width;&lt;br /&gt;    $scope.mapheight = screen.height;&lt;br /&gt;&lt;br /&gt;    var lat;&lt;br /&gt;    var lng;&lt;br /&gt; &lt;br /&gt; // executes onSuccess Callback&lt;br /&gt;    var onSuccess = function(position) {&lt;br /&gt;                console.log(&#39;Latitude: &#39;  + position.coords.latitude + &#39;\n&#39; +&lt;br /&gt;                            &#39;Longitude: &#39; + position.coords.longitude + &#39;\n&#39; +&lt;br /&gt;                            &#39;Accuracy: &#39;  + position.coords.accuracy )&lt;br /&gt;    lat =  position.coords.latitude;  &lt;br /&gt;    lng =  position.coords.longitude; &lt;br /&gt; &lt;br /&gt;     // accessToken is provided by mapbox once you signup @ https://www.mapbox.com &lt;br /&gt;   &lt;br /&gt;  mapboxgl.accessToken = &#39;&amp;lt; Your mapbox gl js Access Token here &amp;gt;&#39;;&lt;br /&gt;  &lt;br /&gt;  var map = new mapboxgl.Map({&lt;br /&gt;   container: &#39;map&#39;, // container id&lt;br /&gt;   style: &#39;mapbox://styles/mapbox/streets-v9&#39;, //stylesheet location&lt;br /&gt;   center: [lng, lat], // starting position&lt;br /&gt;   zoom: 15,&lt;br /&gt;   pitch: 45 // starting zoom&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt; map.on(&#39;load&#39;, function () {&lt;br /&gt;  // Code which is executed after the map is loaded&lt;br /&gt; }) &lt;br /&gt;&lt;br /&gt;    };&lt;br /&gt; &lt;br /&gt;    // executes onError Callback&lt;br /&gt; &lt;br /&gt;    function onError(error) {&lt;br /&gt;        aconsole.log(&#39;code: &#39;    + error.code    + &#39;\n&#39; +&lt;br /&gt;                     &#39;message: &#39; + error.message + &#39;\n&#39;);&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;     // to get currentposition&lt;br /&gt; &lt;br /&gt;     navigator.geolocation.getCurrentPosition(onSuccess, onError);&lt;/your&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;your access=&quot;&quot; here=&quot;&quot; token=&quot;&quot;&gt;&lt;br /&gt;&lt;/your&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; if you run your code using &quot;ionic serve&quot; command, you will notice that Mapbox map is already functional and is visible on your app.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-to0j2sBlZzw/WLKuOtG3xCI/AAAAAAAAAbA/epppUDLBc2wfQ60bzzZIFiVRH78Z0EHRACLcB/s1600/map%2Bwithout%2Bmarker.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://4.bp.blogspot.com/-to0j2sBlZzw/WLKuOtG3xCI/AAAAAAAAAbA/epppUDLBc2wfQ60bzzZIFiVRH78Z0EHRACLcB/s400/map%2Bwithout%2Bmarker.JPG&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;Add a marker to the map&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Well Map is centered to our current location, but we actually don&#39;t know the exact location on the map without any indicator right !.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;let&#39;s add a marker on the map, to indicate our location. markers position uses the same coordinates that are used to center the map.  &lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add the following code to your MapCtrl controller, just after you map&#39;s initialization code. in &lt;b&gt;map.on(&#39;load&#39;)&lt;/b&gt; function.&lt;/span&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// Beolow code Add&#39;s a layer showing the places&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;   map.addLayer({&lt;br /&gt;     &quot;id&quot;: &quot;places&quot;,&lt;br /&gt;     &quot;type&quot;: &quot;symbol&quot;,&lt;br /&gt;     &quot;source&quot;: {&lt;br /&gt;   &quot;type&quot;: &quot;geojson&quot;,&lt;br /&gt;   &quot;data&quot;: {&lt;br /&gt;    &quot;type&quot;: &quot;FeatureCollection&quot;,&lt;br /&gt;    &quot;features&quot;: [{&lt;br /&gt;     &quot;type&quot;: &quot;Feature&quot;,&lt;br /&gt;     &quot;geometry&quot;: {&lt;br /&gt;      &quot;type&quot;: &quot;Point&quot;,&lt;br /&gt;      &quot;coordinates&quot;: [lng, lat]&lt;br /&gt;     },&lt;br /&gt;     &quot;properties&quot;: {&lt;br /&gt;      &quot;title&quot;: &quot;My Location&quot;,&lt;br /&gt;      &quot;description&quot;: &quot;This is My Location!&quot;,&lt;br /&gt;      &quot;icon&quot;: &quot;monument&quot;&lt;br /&gt;     }&lt;br /&gt;    }]&lt;br /&gt;   }&lt;br /&gt;     },&lt;br /&gt;     &quot;layout&quot;: {&lt;br /&gt;   &quot;icon-image&quot;: &quot;{icon}-15&quot;,&lt;br /&gt;   &quot;text-field&quot;: &quot;{title}&quot;,&lt;br /&gt;   &quot;text-font&quot;: [&quot;Open Sans Semibold&quot;, &quot;Arial Unicode MS Bold&quot;],&lt;br /&gt;   &quot;text-offset&quot;: [0, 0.6],&lt;br /&gt;   &quot;text-anchor&quot;: &quot;top&quot;&lt;br /&gt;     }&lt;br /&gt;    });&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-WXviZ3nAnPc/WLKwxDZUkFI/AAAAAAAAAbY/jiM2Hm1IU_8cW0VTa2KTndijVskOm9SGwCLcB/s1600/mylocation.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://1.bp.blogspot.com/-WXviZ3nAnPc/WLKwxDZUkFI/AAAAAAAAAbY/jiM2Hm1IU_8cW0VTa2KTndijVskOm9SGwCLcB/s400/mylocation.JPG&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Add a PopUp &amp;nbsp;to the map&lt;/b&gt;&lt;br /&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Let&#39;s add a popup to the marker. we can do this by adding a click event to the map, when ever a click event is detected we will open a popup saying &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This is My Location!&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&quot;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Add the following code to your MapCtrl controller, just after you&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;b&gt;map.addLayer()&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;code block.&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;br /&gt;  map.on(&#39;click&#39;, function (e) {&lt;br /&gt;   console.log(e)&lt;br /&gt;    var features = map.queryRenderedFeatures(e.point, { layers: [&#39;places&#39;] });&lt;br /&gt;       if (!features.length) {&lt;br /&gt;     return;&lt;br /&gt;    }&lt;br /&gt;   var popup = new mapboxgl.Popup()&lt;br /&gt;    .setLngLat(features[0].geometry.coordinates)&lt;br /&gt;    .setHTML(features[0].properties.description)&lt;br /&gt;    .addTo(map);&lt;br /&gt;    &lt;br /&gt;  })&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-464JDoc56_0/WLKwqo6A7bI/AAAAAAAAAbU/h1oZPClr8n4BzsrXhHC-yOU90fxOJNwQwCLcB/s1600/mapbox%2Bpopup.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://3.bp.blogspot.com/-464JDoc56_0/WLKwqo6A7bI/AAAAAAAAAbU/h1oZPClr8n4BzsrXhHC-yOU90fxOJNwQwCLcB/s400/mapbox%2Bpopup.JPG&quot; width=&quot;223&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now if you tap the marker you should see a little popup saying “&lt;span style=&quot;color: #a2c4c9;&quot;&gt;This is My Location!&lt;/span&gt;”.&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;How to Display 3D Building on mapbox map?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;If you want to view 3D building on mapbox map just add the below given code, inside&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;map.on(&#39;load&#39;)&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;function.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt; map.addLayer({&lt;br /&gt;        &#39;id&#39;: &#39;3d-buildings&#39;,&lt;br /&gt;        &#39;source&#39;: &#39;composite&#39;,&lt;br /&gt;        &#39;source-layer&#39;: &#39;building&#39;,&lt;br /&gt;        &#39;filter&#39;: [&#39;==&#39;, &#39;extrude&#39;, &#39;true&#39;],&lt;br /&gt;        &#39;type&#39;: &#39;fill-extrusion&#39;,&lt;br /&gt;        &#39;minzoom&#39;: 15,&lt;br /&gt;        &#39;paint&#39;: {&lt;br /&gt;            &#39;fill-extrusion-color&#39;: &#39;#aaa&#39;,&lt;br /&gt;            &#39;fill-extrusion-height&#39;: {&lt;br /&gt;                &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;                &#39;property&#39;: &#39;height&#39;&lt;br /&gt;            },&lt;br /&gt;            &#39;fill-extrusion-base&#39;: {&lt;br /&gt;                &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;                &#39;property&#39;: &#39;min_height&#39;&lt;br /&gt;            },&lt;br /&gt;            &#39;fill-extrusion-opacity&#39;: .6&lt;br /&gt;        }&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-BfyDxVSG62s/WLK0fLU_hzI/AAAAAAAAAbw/hO1tkBIJxs4SrjYeIjtvBIzoMqvTmkPvACLcB/s1600/mapbox%2B3d.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://1.bp.blogspot.com/-BfyDxVSG62s/WLK0fLU_hzI/AAAAAAAAAbw/hO1tkBIJxs4SrjYeIjtvBIzoMqvTmkPvACLcB/s400/mapbox%2B3d.JPG&quot; width=&quot;223&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;That&#39;s it guys, now you can view 3D buildings on your mapbox map .&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Below is the full code of the controller that we just did, if you encounter any error&#39;s in the above process just copy and paste the below code on to your app.js file.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;.controller(&#39;MapCtrl&#39;, function($scope) {&lt;br /&gt;&lt;br /&gt;// executes onSuccess Callback&lt;br /&gt; $scope.mapwidth = screen.width;&lt;br /&gt; $scope.mapheight = screen.height;&lt;br /&gt;&lt;br /&gt;    var lat;&lt;br /&gt;    var lng;&lt;br /&gt;    var onSuccess = function(position) {&lt;br /&gt;                console.log(&#39;Latitude: &#39;  + position.coords.latitude + &#39;\n&#39; +&lt;br /&gt;                            &#39;Longitude: &#39; + position.coords.longitude + &#39;\n&#39; +&lt;br /&gt;                            &#39;Accuracy: &#39;  + position.coords.accuracy )&lt;br /&gt;    lat =  position.coords.latitude;  &lt;br /&gt;    lng =  position.coords.longitude; &lt;br /&gt; &lt;br /&gt;     // accessToken is provided by mapbox once you signup @ https://www.mapbox.com &lt;br /&gt;   &lt;br /&gt;  mapboxgl.accessToken = &#39;&amp;lt; Your mapbox gl js Access Token here &amp;gt;&#39;;&lt;br /&gt;  var map = new mapboxgl.Map({&lt;br /&gt;   container: &#39;map&#39;, // container id&lt;br /&gt;   style: &#39;mapbox://styles/mapbox/streets-v9&#39;, //stylesheet location&lt;br /&gt;   center: [lng, lat], // starting position&lt;br /&gt;   zoom: 15,&lt;br /&gt;   pitch: 45 // starting zoom&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt; map.on(&#39;load&#39;, function () {&lt;br /&gt;  map.addLayer({&lt;br /&gt;     &quot;id&quot;: &quot;places&quot;,&lt;br /&gt;     &quot;type&quot;: &quot;symbol&quot;,&lt;br /&gt;     &quot;source&quot;: {&lt;br /&gt;   &quot;type&quot;: &quot;geojson&quot;,&lt;br /&gt;   &quot;data&quot;: {&lt;br /&gt;    &quot;type&quot;: &quot;FeatureCollection&quot;,&lt;br /&gt;    &quot;features&quot;: [{&lt;br /&gt;     &quot;type&quot;: &quot;Feature&quot;,&lt;br /&gt;     &quot;geometry&quot;: {&lt;br /&gt;      &quot;type&quot;: &quot;Point&quot;,&lt;br /&gt;      &quot;coordinates&quot;: [lng, lat]&lt;br /&gt;     },&lt;br /&gt;     &quot;properties&quot;: {&lt;br /&gt;      &quot;title&quot;: &quot;My Location&quot;,&lt;br /&gt;      &quot;description&quot;: &quot;This is My Location!&quot;,&lt;br /&gt;      &quot;icon&quot;: &quot;monument&quot;&lt;br /&gt;     }&lt;br /&gt;    }]&lt;br /&gt;   }&lt;br /&gt;     },&lt;br /&gt;     &quot;layout&quot;: {&lt;br /&gt;   &quot;icon-image&quot;: &quot;{icon}-15&quot;,&lt;br /&gt;   &quot;text-field&quot;: &quot;{title}&quot;,&lt;br /&gt;   &quot;text-font&quot;: [&quot;Open Sans Semibold&quot;, &quot;Arial Unicode MS Bold&quot;],&lt;br /&gt;   &quot;text-offset&quot;: [0, 0.6],&lt;br /&gt;   &quot;text-anchor&quot;: &quot;top&quot;&lt;br /&gt;     }&lt;br /&gt;    });&lt;br /&gt;    &lt;br /&gt;  map.addLayer({&lt;br /&gt;   &#39;id&#39;: &#39;3d-buildings&#39;,&lt;br /&gt;   &#39;source&#39;: &#39;composite&#39;,&lt;br /&gt;   &#39;source-layer&#39;: &#39;building&#39;,&lt;br /&gt;   &#39;filter&#39;: [&#39;==&#39;, &#39;extrude&#39;, &#39;true&#39;],&lt;br /&gt;   &#39;type&#39;: &#39;fill-extrusion&#39;,&lt;br /&gt;   &#39;minzoom&#39;: 15,&lt;br /&gt;   &#39;paint&#39;: {&lt;br /&gt;    &#39;fill-extrusion-color&#39;: &#39;#aaa&#39;,&lt;br /&gt;    &#39;fill-extrusion-height&#39;: {&lt;br /&gt;     &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;     &#39;property&#39;: &#39;height&#39;&lt;br /&gt;    },&lt;br /&gt;    &#39;fill-extrusion-base&#39;: {&lt;br /&gt;     &#39;type&#39;: &#39;identity&#39;,&lt;br /&gt;     &#39;property&#39;: &#39;min_height&#39;&lt;br /&gt;    },&lt;br /&gt;    &#39;fill-extrusion-opacity&#39;: .6&lt;br /&gt;   }&lt;br /&gt;  });&lt;br /&gt;     &lt;br /&gt;  map.on(&#39;click&#39;, function (e) {&lt;br /&gt;   console.log(e)&lt;br /&gt;    var features = map.queryRenderedFeatures(e.point, { layers: [&#39;places&#39;] });&lt;br /&gt;       if (!features.length) {&lt;br /&gt;     return;&lt;br /&gt;    }&lt;br /&gt;   var popup = new mapboxgl.Popup()&lt;br /&gt;    .setLngLat(features[0].geometry.coordinates)&lt;br /&gt;    .setHTML(features[0].properties.description)&lt;br /&gt;    .addTo(map);&lt;br /&gt;    &lt;br /&gt;  })  &lt;br /&gt;&lt;br /&gt; &lt;br /&gt; }) &lt;br /&gt;&lt;br /&gt;    };&lt;br /&gt; &lt;br /&gt;    // executes onError Callback&lt;br /&gt; &lt;br /&gt;    function onError(error) {&lt;br /&gt;        aconsole.log(&#39;code: &#39;    + error.code    + &#39;\n&#39; +&lt;br /&gt;                     &#39;message: &#39; + error.message + &#39;\n&#39;);&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;     // to get currentposition&lt;br /&gt; &lt;br /&gt;     navigator.geolocation.getCurrentPosition(onSuccess, onError);&lt;br /&gt;&lt;br /&gt;})&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;PS: Don&#39;t forget to add the &lt;b&gt;mapbox &lt;/b&gt;Access Token, without which the map wont be displayed.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/2273871183835931784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=2273871183835931784&amp;isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/2273871183835931784'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/2273871183835931784'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/02/how-to-integrate-mapbox-gl-js-maps-with.html' title='How to Integrate Mapbox GL JS Maps with an Ionic Application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-3ODFXtAvNas/WLK6AXcOeFI/AAAAAAAAAcI/cUSHLYws-u48xgvh1_sw7XOLO_C_W-USQCLcB/s72-c/ionic%252Bmapbox.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-7213076629123606232</id><published>2017-01-01T05:29:00.000-08:00</published><updated>2017-01-13T05:04:20.732-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><category scheme="http://www.blogger.com/atom/ns#" term="ionic framework"/><title type='text'>How to Create a project in ionic framework 1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Ionic&lt;/span&gt; &lt;/span&gt;is an HTML5 mobile application development framework targeted at building hybrid mobile apps.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Building Apps to multiple mobile platform&#39;s is very easy by IonicFramework.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;In this post i&#39;m going to explaing you, how to Create a project in IonicFramework.&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-NiwOQWrDtr0/WHjP7vmwIaI/AAAAAAAAAZI/11VnJUR1xz8PIBGvQsHGbkDirth4bbrDACLcB/s1600/ionic.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://1.bp.blogspot.com/-NiwOQWrDtr0/WHjP7vmwIaI/AAAAAAAAAZI/11VnJUR1xz8PIBGvQsHGbkDirth4bbrDACLcB/s320/ionic.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;First, If you haven&#39;t &amp;nbsp;already have the required environment in your system, for building a project on Ionic. please follow the below steps to setup the environment in your system.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;install&amp;nbsp;Node.js from this link &lt;b&gt;:&lt;/b&gt;&amp;nbsp;&lt;a href=&quot;http://nodejs.org/&quot;&gt;http://nodejs.org/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Then, install the latest Cordova and Ionic command-line tools in your terminal using the following command&amp;nbsp;&lt;/span&gt; &lt;pre class=&quot;prettyprint linenums lang-js&quot;&gt;npm install -g cordova ionic&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now, you can create the ionic project by typing the below command in your system&amp;nbsp;Command-line interface.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt; &lt;br /&gt;&lt;pre class=&quot;prettyprint linenums lang-js&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ionic start appName tabs&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Where &quot;appName&quot; is your projects name and &quot;tabs&quot; tells ionic to create project in tabs style.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;IonicFramework&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;offers three ready-made app templates, below is the command to create each app template.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;To Create Blank Template, use the following command.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre class=&quot;prettyprint linenums lang-js&quot;&gt;ionic start appName blank&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;If you prefer sidemenu, use this command.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint linenums lang-js&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ionic start appName sidemenu&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Execute any of the above mentioned command&#39;s &amp;amp; Wait for the command-line to finish the project creation process. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Once the CLI is finished with creation of project, navigate to the project folder using command-line. ie. &lt;span style=&quot;background-color: #f4cccc;&quot;&gt;cd&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f4cccc; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;appName&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Now, run the following command to run the project in browser.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint linenums lang-js&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;ionic serve&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/7213076629123606232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=7213076629123606232&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7213076629123606232'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7213076629123606232'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2017/01/how-to-create-project-in-ionic.html' title='How to Create a project in ionic framework 1'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-NiwOQWrDtr0/WHjP7vmwIaI/AAAAAAAAAZI/11VnJUR1xz8PIBGvQsHGbkDirth4bbrDACLcB/s72-c/ionic.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-9178870629734882929</id><published>2016-01-16T19:15:00.001-08:00</published><updated>2016-01-16T20:20:19.335-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="android broken scrren"/><category scheme="http://www.blogger.com/atom/ns#" term="samsung Screen broken unlock"/><category scheme="http://www.blogger.com/atom/ns#" term="Unlock samsung broken screen"/><category scheme="http://www.blogger.com/atom/ns#" term="unlock samsung galaxy s3"/><title type='text'>How to Unlock Samsung Android phone with Broken Screen and if Display not working?  </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;R&lt;/span&gt;ecently my Samsung Galaxy S3 phone screen got Cracked. The phone is working fine but the Display is not Working ie. it&#39;s not displaying anything, I tried few method&#39;s by connecting the phone to my PC to backup the data but all my tries didn&#39;t work.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;With a bit of Luck and with some online knowledge i had successfully backed-up my data to my PC, Below is the process which i used to backup data from my Screen cracked Samsung phone.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Instructions:&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;u&gt;Note::&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt; &lt;/span&gt;The phone should have access to internet and you should have a Samsung account linked with the phone. (That&#39;s it for the &quot;&lt;u&gt;Luck&lt;/u&gt;&quot; Part).&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Launch your Browser and goto &quot;&amp;nbsp;&lt;a href=&quot;https://findmymobile.samsung.com/&quot;&gt;https://findmymobile.samsung.com&lt;/a&gt; &quot; .&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-voy6_uS0-MM/Vpp3hHUZ85I/AAAAAAAAAU8/s6cHVSJifOs/s1600/FMS%2BImage%2B1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;http://3.bp.blogspot.com/-voy6_uS0-MM/Vpp3hHUZ85I/AAAAAAAAAU8/s6cHVSJifOs/s640/FMS%2BImage%2B1.JPG&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif; text-align: left;&quot;&gt;Now, sign in to the site with the help of your Samsung Account Credentials that&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif; text-align: left;&quot;&gt;you used to register your device.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;You will be provided with the List of Devices that are connected/linked with the Account as follow&#39;s.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-ma1B0y_bDQU/VpsWc57PJvI/AAAAAAAAAVs/zKj92AHUP9E/s1600/new.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;http://2.bp.blogspot.com/-ma1B0y_bDQU/VpsWc57PJvI/AAAAAAAAAVs/zKj92AHUP9E/s640/new.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Select the Respective device which you want to unlock.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Note::&lt;/span&gt;&lt;/u&gt; On the top left of the screen you will have the Registered device icon, under &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; which you should have the Device status showing &quot;Connection&quot; and &quot;Remote &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; controls&quot; as &quot;ON&quot;.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;To the left side of the site, you can see an option as &quot; Unlock my Device&quot; select it.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-AsvqEOW3Wk8/VpsFc0HBz5I/AAAAAAAAAVY/jPNhwn4uOgY/s1600/new%2Bunlock%2Bmy%2Bscreen.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;http://4.bp.blogspot.com/-AsvqEOW3Wk8/VpsFc0HBz5I/AAAAAAAAAVY/jPNhwn4uOgY/s640/new%2Bunlock%2Bmy%2Bscreen.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Now,Click on the &quot;Unlock&quot; button, it may take sometime for your Device to get unlocked.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-09n8QSXk2Z0/VpsFygEqlcI/AAAAAAAAAVc/uxUpOXIVgPM/s1600/new%2Bunlock%2Bsuccess.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;http://1.bp.blogspot.com/-09n8QSXk2Z0/VpsFygEqlcI/AAAAAAAAAVc/uxUpOXIVgPM/s640/new%2Bunlock%2Bsuccess.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;If all goes well, you should be able to hear screen unlock sound ( which i heard when my phone got unlocked :-0 ) and you will see the above message as &quot;The function has been executed successfully&quot;.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Now connect your Device to the PC and backup all the data.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;span style=&quot;color: #990000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;u&gt;Note::&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You can also use this method to unlock your Samsung device after too many &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pattern attempts.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/9178870629734882929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=9178870629734882929&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/9178870629734882929'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/9178870629734882929'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2016/01/how-to-unlock-samsung-android-phone.html' title='How to Unlock Samsung Android phone with Broken Screen and if Display not working?  '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-voy6_uS0-MM/Vpp3hHUZ85I/AAAAAAAAAU8/s6cHVSJifOs/s72-c/FMS%2BImage%2B1.JPG" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-70917579506660783</id><published>2015-12-28T08:03:00.000-08:00</published><updated>2015-12-28T08:10:20.344-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GRUB"/><category scheme="http://www.blogger.com/atom/ns#" term="remove grub"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><category scheme="http://www.blogger.com/atom/ns#" term="windows 7"/><category scheme="http://www.blogger.com/atom/ns#" term="windows recovery"/><category scheme="http://www.blogger.com/atom/ns#" term="windows unix dual boot"/><title type='text'>How to Remove GRUB Boot Loader, If your Windows Recovery CD is NOT showing Command Prompt Option.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Recently i&#39;have tried to uninstall GRUB from my Windows 7 Dual Boot. My Laptop didn&#39;t came with a Windows recovery Disk, but instead i was provided with an option to make Recovery CD from the inbuilt software provided by the&amp;nbsp;manufacturer.&lt;br /&gt;&lt;br /&gt;I have inserted the Recovery CD in the CD Drive, and booted from it. But it doesn&#39;t show the option &quot;Command Prompt&quot; any where. All i can see is the Custom UI provided by manufacturer to recover my Windows.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;u&gt;Note&lt;/u&gt;: If your see &quot;Command Prompt&quot; as one of the option when your boot from your Windows Recovery CD, then follow the step&#39;s on this article &quot;&lt;a href=&quot;http://www.gowriter.blogspot.com/&quot;&gt;How to remove GRUB from Windows Dual Boot&lt;/a&gt;&quot; to remove GRUB from your PC.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;So, after looking for solution&#39;s over the internet. Below is the method, that i used to remove GRUB from my Windows PC.&lt;br /&gt;&lt;br /&gt;Recovery Console is very useful tool for fixing &amp;nbsp;problems in windows, it can be accessed while booting window&#39;s. below are the step&#39;s on how to access recovery console and to remove GRUB using recover console.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Restart the Computer&lt;/li&gt;&lt;li&gt;After the Startup message appear&#39;s, Press the &lt;span style=&quot;color: #b45f06;&quot;&gt;F8&lt;/span&gt; key ( F8, key should be pressed before windows starts)&lt;/li&gt;&lt;li&gt;Now, you will be taken to black screen with option as &quot;&lt;span style=&quot;color: #b45f06;&quot;&gt;Repair your computer&lt;/span&gt;&quot;, select the option and press enter.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Cs6TViHARY4/VoFX96Q3HvI/AAAAAAAAATs/MnU2RwGw_9c/s1600/1FULL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;316&quot; src=&quot;http://3.bp.blogspot.com/-Cs6TViHARY4/VoFX96Q3HvI/AAAAAAAAATs/MnU2RwGw_9c/s400/1FULL.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;It will Load a Custom Recovery program ie. The Recovery tool provided by windows.&lt;/li&gt;&lt;li&gt;Now, Click Next after Selecting your Keyboard layout(input method) and language preferences.&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-d0HjpokUgGs/VoFaEoviFbI/AAAAAAAAAT4/8czqvv-s2ic/s1600/KEYBOARD.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;http://1.bp.blogspot.com/-d0HjpokUgGs/VoFaEoviFbI/AAAAAAAAAT4/8czqvv-s2ic/s320/KEYBOARD.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Next, Choose your Username and Password and click on OK.&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;u&gt;Note &lt;/u&gt;:: It should be administrator username and you should have access to the &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; password. The selected account should have administrative rights. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-xJCrrQVmq7U/VoFaaOjacqI/AAAAAAAAAUA/ZmS3DOhj37I/s1600/USERPASS.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;http://3.bp.blogspot.com/-xJCrrQVmq7U/VoFaaOjacqI/AAAAAAAAAUA/ZmS3DOhj37I/s320/USERPASS.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A window, listing several repair &amp;amp; recovery option&#39;s should be visible now as below.&lt;/li&gt;&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-M5B1ykid0AM/VoFanH62FrI/AAAAAAAAAUI/p36R4tcj_0E/s1600/2HS.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;http://4.bp.blogspot.com/-M5B1ykid0AM/VoFanH62FrI/AAAAAAAAAUI/p36R4tcj_0E/s400/2HS.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Choose option &quot;&lt;span style=&quot;color: #b45f06;&quot;&gt;Command Prompt&lt;/span&gt;&quot; at the bottom of the window.&lt;/li&gt;&lt;li&gt;Now, on command prompt type this command &amp;nbsp;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;bootrec.exe /fixmbr&lt;/span&gt;&lt;/code&gt;&amp;nbsp; as shown below and press Enter&amp;nbsp;&lt;b&gt;↵&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-oirWXgwJ39Q/VoFazZMQCpI/AAAAAAAAAUQ/cR-KwQn5YIk/s1600/COMPROMPTS.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;211&quot; src=&quot;http://1.bp.blogspot.com/-oirWXgwJ39Q/VoFazZMQCpI/AAAAAAAAAUQ/cR-KwQn5YIk/s400/COMPROMPTS.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You will be provided with a response as &quot; &lt;span style=&quot;color: #b45f06;&quot;&gt;The Operation Completed Succesfully&lt;/span&gt; &quot; by the command prompt.&lt;/li&gt;&lt;li&gt;It&#39;s &lt;span style=&quot;color: #b45f06;&quot;&gt;Done&lt;/span&gt;, exit command prompt and Restart your PC by selecting &quot;restart&quot;, it should boot in windows now.&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;I&lt;/span&gt;f this article is of any help to you, please leave a comment below.&lt;/blockquote&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/70917579506660783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=70917579506660783&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/70917579506660783'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/70917579506660783'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2015/12/how-to-remove-grub-boot-loader-if-your.html' title='How to Remove GRUB Boot Loader, If your Windows Recovery CD is NOT showing Command Prompt Option.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Cs6TViHARY4/VoFX96Q3HvI/AAAAAAAAATs/MnU2RwGw_9c/s72-c/1FULL.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-9027564052908354812</id><published>2015-03-28T00:38:00.000-07:00</published><updated>2015-03-28T00:38:00.787-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="cookies"/><category scheme="http://www.blogger.com/atom/ns#" term="Delete Cookies"/><category scheme="http://www.blogger.com/atom/ns#" term="Delete Google chrome cookies"/><category scheme="http://www.blogger.com/atom/ns#" term="Google chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="how to"/><title type='text'>How to Delete or Remove Cookies in Google Chrome browser.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Browser Cookies are small files stored inside your browser by websites to make your user experience more fluent and also may collect some data from your browser like your browsing habits etc. using the tracking cookies.&lt;br /&gt;&lt;br /&gt;Although cookies are stored on your PC by the websites, we can easily remove them by the tools that are built inside the browser&#39;s.&lt;br /&gt;&lt;br /&gt;In this post, we will see how to delete the cookies that are stored in your Google Chrome browser.&lt;br /&gt;&lt;br /&gt;Follow this simple steps to delete the cookies in your browser.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;STEPS&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Open Google Chrome browser&lt;/b&gt; :&lt;/li&gt;&lt;/ul&gt;Open Google Chrome browser on your PC.&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-D-rEq2sQTsk/VRZREP8JYII/AAAAAAAAAQ0/kDC8PntDcrM/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(1).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-D-rEq2sQTsk/VRZREP8JYII/AAAAAAAAAQ0/kDC8PntDcrM/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(1).png&quot; height=&quot;342&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;b&gt;Go to &quot;More Tools&quot;:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;You can find this option by Clicking on the  &lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-apS0ghVBauY/VQ-koweD1tI/AAAAAAAAAPk/BaKlECtWq0w/s1600/Button.PNG&quot; /&gt; Button on the Top Right of the Browser.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-XiW_g2KZ-Pk/VRZScQN5u_I/AAAAAAAAARA/dF9LFgjg2d8/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(2).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-XiW_g2KZ-Pk/VRZScQN5u_I/AAAAAAAAARA/dF9LFgjg2d8/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(2).png&quot; height=&quot;342&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Go to &quot;Clear browsing data&quot;:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;After going to &lt;i&gt;More Tools&lt;/i&gt;, Click on the &lt;i&gt;Clear browsing data...&lt;/i&gt; option. You can also directly go to this by pressing &lt;b&gt;Ctrl+shift+Del&lt;/b&gt; on your keyboard.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-ftKYSD9aFy0/VRZStpME6nI/AAAAAAAAARI/uiSCRq9nvO8/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(3).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-ftKYSD9aFy0/VRZStpME6nI/AAAAAAAAARI/uiSCRq9nvO8/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(3).png&quot; height=&quot;342&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Click on Content Settings:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;At the bottom left of the Clear browsing data pop-up, you will see an option called &quot;content settings&quot;. click on the Content settings option.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-fRt9YK-3I8I/VRZToCPz7UI/AAAAAAAAARQ/usgqoVHP7Fg/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(4).PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-fRt9YK-3I8I/VRZToCPz7UI/AAAAAAAAARQ/usgqoVHP7Fg/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(4).PNG&quot; height=&quot;342&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;All cookies and site data:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;In the Content settings pop-up&lt;b&gt;, &lt;/b&gt;under the cookies section click on the &quot;All cookies and site data...&quot; Button.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-A7mQASbHzwQ/VRZVIzp-PfI/AAAAAAAAARc/RVx8UELHuMk/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(5).PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-A7mQASbHzwQ/VRZVIzp-PfI/AAAAAAAAARc/RVx8UELHuMk/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(5).PNG&quot; height=&quot;596&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Remove Individual Cookies:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;In the cookies and site data pop-up, you will see all the cookies that are stored in your Google chrome browser. You can delete every individual cookie by selecting your desired cookie and by clicking on the &lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;x&lt;/b&gt;&lt;/span&gt; on the right side of the selected cookie section.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-lZa7vxjfwss/VRZXSZUugZI/AAAAAAAAARo/cA6QrGSAfiA/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(7).PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-lZa7vxjfwss/VRZXSZUugZI/AAAAAAAAARo/cA6QrGSAfiA/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(7).PNG&quot; height=&quot;513&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Remove all the Cookies:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;You can delete all the cookies that are stored in your browser by just clicking on the &quot;Remove all&quot; button on the top right of the Cookies and site data pop-up.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-0EID0t0A-do/VRZX0nSbXXI/AAAAAAAAARw/eWfLMW-0r3M/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(6).PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-0EID0t0A-do/VRZX0nSbXXI/AAAAAAAAARw/eWfLMW-0r3M/s1600/Delete%2BGoogle%2BChrome%2BCookies%2B(6).PNG&quot; height=&quot;512&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;u&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/u&gt;&lt;/span&gt; Before Deleting all the cookies from your Browser, check to see if any of the cookies are required. deleting the cookies may impact your browsing behaviour.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;b&gt;Video Tutorial on how to delete cookies on Google Chrome Browser:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/SYOqhWlYBUI/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;281&quot; src=&quot;http://www.youtube.com/embed/SYOqhWlYBUI?feature=player_embedded&quot; width=&quot;500&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/9027564052908354812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=9027564052908354812&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/9027564052908354812'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/9027564052908354812'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2015/03/how-to-delete-or-remove-cookies-in.html' title='How to Delete or Remove Cookies in Google Chrome browser.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-D-rEq2sQTsk/VRZREP8JYII/AAAAAAAAAQ0/kDC8PntDcrM/s72-c/Delete%2BGoogle%2BChrome%2BCookies%2B(1).png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3412955273500440667.post-7795461953437987980</id><published>2015-03-22T23:31:00.003-07:00</published><updated>2015-03-22T23:31:26.696-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="Clear History"/><category scheme="http://www.blogger.com/atom/ns#" term="Delete History"/><title type='text'>How to Delete History in Google Chrome Browser</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;B&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;rowser History is one place where we and also other&#39;s can see what we are doing, and which sites we are surfing.&lt;br /&gt;If you dont want other&#39;s to see your browsing site&#39;s info, it&#39;s better to Browse in Incognito mode or Delete the history after your browsing session is over.&lt;br /&gt;If you are using Google Chrome browser, You can clear the history by following the below step&#39;s.&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Open Google Chrome browser:&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;Open Google Chrome browser&amp;nbsp; on your computer.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-FapynGp3AY8/VQ-jkm6y05I/AAAAAAAAAPY/L0TNjfapbQE/s1600/Delete%2BHistory%2BChrome%2B(1).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://2.bp.blogspot.com/-FapynGp3AY8/VQ-jkm6y05I/AAAAAAAAAPY/L0TNjfapbQE/s1600/Delete%2BHistory%2BChrome%2B(1).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp; &lt;b&gt;Go to &quot;More Tools&quot;:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;You can find this option by Clicking on the  &lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-apS0ghVBauY/VQ-koweD1tI/AAAAAAAAAPk/BaKlECtWq0w/s1600/Button.PNG&quot; /&gt; Button on the Top Right of the Browser.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-L17tisPE_qI/VQ-l79giCWI/AAAAAAAAAPw/X2ykx4dyKYY/s1600/Delete%2BHistory%2BChrome%2B(2).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://1.bp.blogspot.com/-L17tisPE_qI/VQ-l79giCWI/AAAAAAAAAPw/X2ykx4dyKYY/s1600/Delete%2BHistory%2BChrome%2B(2).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Go to &quot;Clear browsing data&quot;:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;After going to &lt;i&gt;More Tools&lt;/i&gt;, Click on the &lt;i&gt;Clear browsing data...&lt;/i&gt; option. You can also directly go to this by pressing &lt;b&gt;Ctrl+shift+Del&lt;/b&gt; on your keyboard.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-treHWi096Qg/VQ-oNdflD5I/AAAAAAAAAP8/DIYmL2hgVmU/s1600/Delete%2BHistory%2BChrome%2B(3).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://4.bp.blogspot.com/-treHWi096Qg/VQ-oNdflD5I/AAAAAAAAAP8/DIYmL2hgVmU/s1600/Delete%2BHistory%2BChrome%2B(3).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Specify Time Period to Delete:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;When the &quot;Clear browsing data&quot; option is clicked, a pop up appears on top of Setting&#39;s tab. Specify the Time period, ranging from hour, day, week and the beginning of time.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Dzkbhe-KG0M/VQ-qnloYG3I/AAAAAAAAAQI/jzYqPccMMOg/s1600/Delete%2BHistory%2BChrome%2B(5).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://1.bp.blogspot.com/-Dzkbhe-KG0M/VQ-qnloYG3I/AAAAAAAAAQI/jzYqPccMMOg/s1600/Delete%2BHistory%2BChrome%2B(5).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Select what to Delete :&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;Below the Time Period option, you will see some more option&#39;s which is of your own interest to select or not to.Here are the options.&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Browsing History&lt;/li&gt;&lt;li&gt;Download History&lt;/li&gt;&lt;li&gt;Cookies and other site and plug-in data&lt;/li&gt;&lt;li&gt;Cached images and files&lt;/li&gt;&lt;li&gt;Passwords&lt;/li&gt;&lt;li&gt;Autofill form data&lt;/li&gt;&lt;li&gt;Hosted app data&lt;/li&gt;&lt;li&gt;Content licenses&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;Note:: Selecting all the options will erase everything including app data, content licenses etc from your browser. Once Deleted the Data cannot be retrieved,So before proceeding forward double check your option&#39;s.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-rL3N-kRJiic/VQ-tRVRFT7I/AAAAAAAAAQU/875I2A6frmY/s1600/Delete%2BHistory%2BChrome%2B(4).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://4.bp.blogspot.com/-rL3N-kRJiic/VQ-tRVRFT7I/AAAAAAAAAQU/875I2A6frmY/s1600/Delete%2BHistory%2BChrome%2B(4).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Select &quot;Clear Browsing Data&quot;:&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;After choosing the required option&#39;s, click on the &quot;Clear Browsing Data&quot; Button on the Bottom right of the pop-up.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-yodK_exjDgY/VQ-uBZPNGhI/AAAAAAAAAQc/s5P1G6UBtrQ/s1600/Delete%2BHistory%2BChrome%2B(6).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;2&quot; src=&quot;http://4.bp.blogspot.com/-yodK_exjDgY/VQ-uBZPNGhI/AAAAAAAAAQc/s5P1G6UBtrQ/s1600/Delete%2BHistory%2BChrome%2B(6).png&quot; height=&quot;268&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Below is a video tutorial on How to Clear History on Google chrome browser.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/Lxr5_5befxg/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;281&quot; src=&quot;http://www.youtube.com/embed/Lxr5_5befxg?feature=player_embedded&quot; width=&quot;500&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://www.gowriter.in/feeds/7795461953437987980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=3412955273500440667&amp;postID=7795461953437987980&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7795461953437987980'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3412955273500440667/posts/default/7795461953437987980'/><link rel='alternate' type='text/html' href='https://www.gowriter.in/2015/03/how-to-delete-history-in-google-chrome.html' title='How to Delete History in Google Chrome Browser'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-FapynGp3AY8/VQ-jkm6y05I/AAAAAAAAAPY/L0TNjfapbQE/s72-c/Delete%2BHistory%2BChrome%2B(1).png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>