<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Angga Lesmana</title>
    <description>The latest articles on DEV Community by Angga Lesmana (@anggachelsea).</description>
    <link>https://dev.to/anggachelsea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F353817%2Fd8bb2cd3-8684-4dc2-9780-129d8cf45a0a.jpg</url>
      <title>DEV Community: Angga Lesmana</title>
      <link>https://dev.to/anggachelsea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anggachelsea"/>
    <language>en</language>
    <item>
      <title>ANGULAR ERROR INTERCEPTORS</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 30 Jan 2023 14:31:25 +0000</pubDate>
      <link>https://dev.to/anggachelsea/angular-error-interceptors-4e23</link>
      <guid>https://dev.to/anggachelsea/angular-error-interceptors-4e23</guid>
      <description>&lt;p&gt;What is interceptor in angular?&lt;br&gt;
This is important for us as developer know about interceptor&lt;br&gt;
so In Angular, an interceptor is a mechanism for handling or transforming HTTP requests and responses globally before they reach the components. It allows you to pre-process or post-process requests and responses. It is commonly used for tasks such as adding headers, handling errors, transforming data, etc.&lt;/p&gt;

&lt;p&gt;why I say that an interceptor is important ? because they provide a way to handle HTTP requests and responses in a centralized and reusable manner, rather than having to write the same code in multiple places. This can improve the maintainability, readability, and testability of your code. Additionally, using interceptors can simplify common tasks such as adding headers or handling errors, reducing the amount of repetitive code and making it easier to make global changes.&lt;/p&gt;

&lt;p&gt;Now Im gonna create the simple interceptor for handle error 401 response service&lt;/p&gt;

&lt;p&gt;the first step we should create the interceptor, we can use commandline to generate interceptor&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng g interceptor error

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Angular will create the file error.interceptor.ts&lt;br&gt;
like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6cvasux50n6jzzow2k7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6cvasux50n6jzzow2k7.png" alt="Image description" width="256" height="31"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and will automaticly create the code interceptor like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2vgeghgeg5tp430wn8r9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2vgeghgeg5tp430wn8r9.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and we can add some code to detect error server&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frt8tlswrbaqk3izn4ycl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frt8tlswrbaqk3izn4ycl.png" alt="Image description" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we will navigate the user is not login to login or to 401 page&lt;br&gt;
but we already create the interceptor file we must import this to app.module.ts&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem3nvb2x7jj11i7zv41l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem3nvb2x7jj11i7zv41l.png" alt="Image description" width="782" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this will direct to 401 page&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnttq7yz6djz01uzcto3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnttq7yz6djz01uzcto3w.png" alt="Image description" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>blockchain</category>
      <category>web3</category>
      <category>offers</category>
    </item>
    <item>
      <title>Share data to all component via service use NgZone, Subject</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Sun, 29 Jan 2023 14:15:55 +0000</pubDate>
      <link>https://dev.to/anggachelsea/share-data-to-all-component-via-service-use-ngzone-subject-585o</link>
      <guid>https://dev.to/anggachelsea/share-data-to-all-component-via-service-use-ngzone-subject-585o</guid>
      <description>&lt;p&gt;There are some cases in Angular that you should know to send data between components or to all components, which many of us often use @Input @Output or we can use global variable and via service&lt;br&gt;
here I'm gonna only explain one first through service (ngZone)&lt;br&gt;
let we create some service &lt;br&gt;
data.service.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//we should import
import { Injectable, NgZone } from '@angular/core';
import { Subject } from 'rxjs';

private dataStr = new Subject&amp;lt;any&amp;gt;()
data$ = this.dataStr.asObservable()

constructor(private ngZone: NgZone) { }


  sendDataUrl(data: any){
   return this.ngZone.run(() =&amp;gt; {
      this.dataStr.next(data)
    } )
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkcjt2vfgtfch8cns7j0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkcjt2vfgtfch8cns7j0.png" alt="Image description" width="768" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and let we create component to send data via service&lt;br&gt;
first we import and inject the service that we created earlier&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import { UrlnavService } from '../../../../shared/urlnav.service';
//here myservice name UrlnavService

constructor(private urlnavService: UrlnavService){}
//inject the service

 sendDataParams(){
    this.urlnavService.sendDataUrl(this.url)
 }
//and create method to send data 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;trust the data will send into Subject data, &lt;br&gt;
After we send data from component1, now we take the data that has been sent to the service in another component&lt;/p&gt;

&lt;p&gt;dont forget we must import the service and inject it like in component before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { UrlnavService } from './shared/urlnav.service';
constructor(private navurlService: UrlnavService){}

//here im getting data via ngOnInit 
 ngOnInit() {
    this.navurlService.data$.subscribe((data: any) =&amp;gt; {
      this.url = data
      console.log(this.url)
    })
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w4878rmmx4lw4l5w5ql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w4878rmmx4lw4l5w5ql.png" alt="Image description" width="745" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;then we can share data to all component via service &lt;/p&gt;

&lt;p&gt;the other way to share data &lt;strong&gt;iscomingsoon&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>webdev</category>
      <category>accountabilibuddies</category>
    </item>
    <item>
      <title>Angular transforming data use rxjs operators</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Sun, 29 Jan 2023 06:35:32 +0000</pubDate>
      <link>https://dev.to/anggachelsea/angular-transforming-data-use-rxjs-operators-56k9</link>
      <guid>https://dev.to/anggachelsea/angular-transforming-data-use-rxjs-operators-56k9</guid>
      <description>&lt;p&gt;There are several cases that I am currently experiencing, namely, How to get response data from firebase whose response is in the form of an object like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zRwGQDLN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4y2cs2nllf4ylcwbxegk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zRwGQDLN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4y2cs2nllf4ylcwbxegk.png" alt="Image description" width="297" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Honestly it's a bit difficult to display the data as follows, and try to transform that response use RXJS operators&lt;/p&gt;

&lt;p&gt;this is exmple code for display data or transforming data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;///write method to get that data
fetchData(){
this.nameService.namemethodfromService().pipe(map((items: any) =&amp;gt; {
  const arrayData = [];
  for(const key of items){
 if(items.hasOwnProperty){
   postArray.push({...items[key], id: key})
 }
  }
return arrayData
})).subscribe((value: any) =&amp;gt; {
      console.log(value);
this.dataItems = value
    })
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M5gfPCU_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlqony72m0ulv6idpfbu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M5gfPCU_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlqony72m0ulv6idpfbu.png" alt="Image description" width="874" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the rxjs I used is, map from rxjs/operators, pipe from rxjs&lt;/p&gt;

&lt;p&gt;please sahre if there the other ways&lt;/p&gt;

</description>
      <category>angular</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>typescript</category>
    </item>
    <item>
      <title>What Should I know for being advance angular dev</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 26 Dec 2022 04:50:09 +0000</pubDate>
      <link>https://dev.to/anggachelsea/what-should-i-know-for-being-advance-angular-dev-1403</link>
      <guid>https://dev.to/anggachelsea/what-should-i-know-for-being-advance-angular-dev-1403</guid>
      <description>&lt;p&gt;I try to ask chatGpt for this situation,&lt;br&gt;
and I got the information for that questions&lt;/p&gt;

&lt;p&gt;To be an advanced Angular developer, you should have a strong understanding of the following concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Components: Components are the building blocks of an Angular application. They are responsible for displaying content and handling user interactions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Services: Services are used to encapsulate business logic and provide a way to share data and functionality across different components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Routing: Routing allows you to define the different URLs that your application supports and the corresponding component that should be displayed for each URL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Forms: Angular provides a powerful framework for building forms, including support for reactive forms and validation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dependency injection: Dependency injection is a way to inject a service or other object into a component or service. It is an important design pattern in Angular and allows for better separation of concerns and testability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Observables: Observables are a way to manage asynchronous data streams in Angular. They are used extensively in Angular to handle HTTP requests and other asynchronous events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pipes: Pipes are a way to transform data in templates. They can be used to format dates, currency, and other types of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modules: Modules are a way to organize your application and manage dependencies. They are used to define the different features of your application and provide a way to reuse code across multiple components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Angular CLI: The Angular CLI is a command-line interface for Angular that makes it easy to create, build, and deploy your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing: Testing is an important part of the development process in Angular. You should be familiar with different types of tests, such as unit tests, integration tests, and end-to-end tests, and have experience writing and running tests for your applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>angular</category>
    </item>
    <item>
      <title>Angular interactive and reactive</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 26 Dec 2022 04:37:52 +0000</pubDate>
      <link>https://dev.to/anggachelsea/angular-interactive-and-reactive-2ao7</link>
      <guid>https://dev.to/anggachelsea/angular-interactive-and-reactive-2ao7</guid>
      <description>&lt;p&gt;Angular uses reactive programming principles to build interactive and responsive web applications. Reactive programming is a programming paradigm that focuses on the use of streams of data that emit values over time, and the use of operations that can be performed on those streams to create new streams of data.&lt;/p&gt;

&lt;p&gt;In Angular, reactive programming is implemented using the&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ReactiveFormsModule and the  FormControl, FormGroup, and FormArray classes&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 , which provide an API for working with forms in a reactive way. These classes allow you to create and manipulate form controls and form groups, and to bind them to templates in a declarative way.&lt;/p&gt;

&lt;p&gt;Reactive programming in Angular allows you to build forms that are more interactive and responsive, as you can use the FormControl and FormGroup classes to track the state of the form and the values of the form controls in real-time, and to update the template and the component class whenever the form state changes.&lt;/p&gt;

&lt;p&gt;On the other hand, Angular also provides a template-driven approach to building forms, which is implemented using the FormsModule and the ngModel directive. This approach allows you to build forms by adding directives to the template and binding the form controls to the template using the ngModel directive. This approach is simpler and easier to use for basic forms, but it is less powerful and flexible than the reactive approach, as it does not provide the same level of control over the form state and the form controls.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>how to use subject in angular</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Thu, 22 Sep 2022 08:54:06 +0000</pubDate>
      <link>https://dev.to/anggachelsea/how-to-use-subject-in-angular-3999</link>
      <guid>https://dev.to/anggachelsea/how-to-use-subject-in-angular-3999</guid>
      <description>&lt;p&gt;let's implement how to use subject in angular,&lt;br&gt;
first we create 2 component , component1 and component2&lt;br&gt;
this is such as share data among different component, &lt;br&gt;
via Serrvice,&lt;/p&gt;

&lt;p&gt;we will create simple input and share texInput to another component&lt;/p&gt;

&lt;p&gt;first we create function in component1.ts&lt;/p&gt;

&lt;p&gt;in component ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; enteredText: string;
  clickFun(){
    console.log(this.enteredText)
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in componenten1.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;input type="text" [(ngModel)]="enteredText"&amp;gt;
  &amp;lt;button (click)="clickFun()"&amp;gt;click&amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydzs9uwocsnsx50839pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydzs9uwocsnsx50839pt.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in the top input text in comp1 &lt;br&gt;
and text &lt;strong&gt;comp2 work&lt;/strong&gt; from component2&lt;/p&gt;

&lt;p&gt;and now create component2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;div class="container"&amp;gt;
  &amp;lt;p&amp;gt;
    comp2 works! {{inputText}}
  &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and in component2 ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  inputText : string

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and now create service for share data from input component1 into component2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;datasubject = new Subject&amp;lt;string&amp;gt;();

 shareDataText(data: any) {
    this.datasubject.next(data.toString()); //
  }


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and dont forget for import Subject from rxjs&lt;br&gt;
if we already create service&lt;br&gt;
now we call the service in the app.module&lt;br&gt;
exactly at providers: [NameService]&lt;/p&gt;

&lt;p&gt;let call service in component1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  constructor(private dataservice: DataService) { }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;dont forget to import the service &lt;br&gt;
and now we create call in our clickbutton function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; clickFun(){
    this.dataservice.shareDataText(this.enteredText)
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and we call the service in component2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ngOnInit() : void{
    this.dataservice.datasubject.subscribe(value =&amp;gt; {
      this.inputText = value
    })
  }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and we see when we click input button in component1&lt;br&gt;
data will show in component2&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvbfibzg1lsierbuiob0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvbfibzg1lsierbuiob0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>connect OpenVpn Server in Ubuntu</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 15 Aug 2022 16:28:29 +0000</pubDate>
      <link>https://dev.to/anggachelsea/connect-openvpn-server-in-ubuntu-1ap7</link>
      <guid>https://dev.to/anggachelsea/connect-openvpn-server-in-ubuntu-1ap7</guid>
      <description>&lt;p&gt;simple step to connect our vpn office using ubutu&lt;br&gt;
first we register our address / port / ip &lt;br&gt;
step to register our vpn &lt;br&gt;
-&amp;gt; open terminal and try cd into hosts&lt;br&gt;
-&amp;gt; cd /etc &lt;br&gt;
-&amp;gt; sudo vi hosts&lt;/p&gt;

&lt;p&gt;and we can register our vpn there&lt;/p&gt;

&lt;p&gt;and install openvpn server in our system&lt;br&gt;
command sudo su use as root&lt;/p&gt;

&lt;p&gt;Sign in to your Linux system on the console or via SSH and obtain root privileges.&lt;br&gt;
Run the commands below to install updates and trigger a prompt to reconfigure the timezone settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt update
apt upgrade
apt install tzdata
dpkg-reconfigure tzdata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install OpenVPN Access Server from the software repository
Option 1: Install via repository (recommended) 
The recommended method to install the OpenVPN Access Server is to use the official OpenVPN Access Server software repository. You will need to be logged on to your Linux system either on the console or via SSH, and have root privileges. Then copy and paste the commands below to add the repository to your system, and install the OpenVPN Access Server client bundle and the OpenVPN Access Server package itself.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt update &amp;amp;&amp;amp; apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian jammy main"&amp;gt;/etc/apt/sources.list.d/openvpn-as-repo.list
apt update &amp;amp;&amp;amp; apt -y install openvpn-as
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if u already install that &lt;br&gt;
check for run vpn service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl start openvpn-server@server
systemctl status openvpn-server@server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if your system openVpn is running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;● openvpn-server@server.service - OpenVPN service for server
     Loaded: loaded (/lib/systemd/system/openvpn-server@.service; enabled; vend&amp;gt;
     Active: active (running) since Mon 2022-08-15 14:41:44 WIB; 4h 30min ago
       Docs: man:openvpn(8)
             https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
             https://community.openvpn.net/openvpn/wiki/HOWTO
   Main PID: 15604 (openvpn)
     Status: "Initialization Sequence Completed"
      Tasks: 1 (limit: 28457)
     Memory: 1.8M
        CPU: 161ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>create variable data in button and share to another button</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Thu, 28 Jul 2022 07:34:04 +0000</pubDate>
      <link>https://dev.to/anggachelsea/create-variable-data-in-button-and-share-to-another-button-1bc6</link>
      <guid>https://dev.to/anggachelsea/create-variable-data-in-button-and-share-to-another-button-1bc6</guid>
      <description>&lt;p&gt;I have one simple case to create variable in button html share into another button&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;td style="width: 3rem"&amp;gt;
              &amp;lt;button
                mat-icon-button
                type="button"
                [matMenuTriggerData]="{ data: data }"
                class="cell-action"
                [matMenuTriggerFor]="actionsMenu"
                (click)="id = data.id"
              &amp;gt;
                &amp;lt;mat-icon
                  style="font-size: 24px"
                  [icIcon]="icMoreHoriz"
                &amp;gt;&amp;lt;/mat-icon&amp;gt;
              &amp;lt;/button&amp;gt;
            &amp;lt;/td&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;see into &lt;code&gt;[matMenuTriggerData] = {data: data}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;ng-template let-data="data" matMenuContent&amp;gt;
    &amp;lt;button mat-menu-item [routerLink]="'./&amp;gt;
      &amp;lt;mat-icon [icIcon]="icPageView"&amp;gt;&amp;lt;/mat-icon&amp;gt;
      &amp;lt;span&amp;gt;Detail&amp;lt;/span&amp;gt;
    &amp;lt;/button&amp;gt;
    &amp;lt;!-- &amp;lt;button mat-menu-item (click)="dd(id)"&amp;gt;
      &amp;lt;mat-icon [icIcon]="icArrowDownward"&amp;gt;Canceled&amp;lt;/mat-icon&amp;gt;
      &amp;lt;span&amp;gt;Unduh&amp;lt;/span&amp;gt;
    &amp;lt;/button&amp;gt; --&amp;gt;
    &amp;lt;!-- &amp;lt;button *ngIf="statusDelete"  mat-menu-item (click)="alertDialog(id)"&amp;gt;
      &amp;lt;mat-icon [icIcon]="icDelete"&amp;gt;&amp;lt;/mat-icon&amp;gt;
      &amp;lt;span &amp;gt;Hapus&amp;lt;/span&amp;gt;
    &amp;lt;/button&amp;gt; --&amp;gt;
    &amp;lt;button *ngIf="data.status != 'Canceled'" mat-menu-item (click)="alertDialog(id)"&amp;gt;
      &amp;lt;mat-icon [icIcon]="icDelete"&amp;gt;&amp;lt;/mat-icon&amp;gt;
      &amp;lt;span &amp;gt;Hapus&amp;lt;/span&amp;gt;
    &amp;lt;/button&amp;gt;
  &amp;lt;/ng-template&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Should Remember Module in Go</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Sun, 17 Oct 2021 03:41:31 +0000</pubDate>
      <link>https://dev.to/anggachelsea/should-remember-module-in-go-1opp</link>
      <guid>https://dev.to/anggachelsea/should-remember-module-in-go-1opp</guid>
      <description>&lt;p&gt;The important should me know in learn go that's it about golang modules, &lt;br&gt;
let we try to remember how to create simple golang modules &lt;br&gt;
first we create folder in our directories&lt;br&gt;
create folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir go-modules
cd go-modules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;okay we already create folder and in folder go-modules&lt;br&gt;
and than we will create module into my github&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go mod init github.com/AnggaChelsea/go-modules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;go.mod will created &lt;br&gt;
now we will try use go get for get http request in our go-modules project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go get github.com/julienschmidt/httprouter
go get go.uber.org/zap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KgQkEreV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yypo8ja1wmxnxbutzrgd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KgQkEreV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yypo8ja1wmxnxbutzrgd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we already create go.sum in our project go-module&lt;br&gt;
we can check our go.sum using terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat go.sum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we will found httprouter, request  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Comment add more guys about modules from u&lt;/em&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>RXJS in consistents in 3 things</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 22 Mar 2021 14:09:04 +0000</pubDate>
      <link>https://dev.to/anggachelsea/rxjs-in-consistents-in-3-things-1f1p</link>
      <guid>https://dev.to/anggachelsea/rxjs-in-consistents-in-3-things-1f1p</guid>
      <description>&lt;p&gt;3 things only for me&lt;br&gt;
RXJS is library javascript making async calls and implements a callback, and a lot of type in rxjs, but I'm going to share just I know it there are three things in rxjs &lt;/p&gt;


&lt;ol&gt;
&lt;li&gt;Observable&lt;/li&gt;
&lt;li&gt;Data Types, Observer, Schadulers, Subject&lt;/li&gt;
&lt;li&gt;Operators&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Array method&lt;/li&gt;
&lt;li&gt;map&lt;/li&gt;
&lt;li&gt;filter&lt;/li&gt;
&lt;li&gt;reduce&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;in three things above will help us in data Streams&lt;/p&gt;

&lt;p&gt;Thanks&lt;br&gt;
Correct Me If I Wrong&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Post data json use apikey</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Thu, 04 Jun 2020 08:09:00 +0000</pubDate>
      <link>https://dev.to/anggachelsea/how-to-post-data-json-use-apikey-4jp0</link>
      <guid>https://dev.to/anggachelsea/how-to-post-data-json-use-apikey-4jp0</guid>
      <description>&lt;p&gt;I will share to you about my experience although not too much &lt;br&gt;
but i hope this is important for you as javascript developer&lt;/p&gt;

&lt;p&gt;const axios = require('axios');&lt;br&gt;
const express = require('express');&lt;/p&gt;

&lt;p&gt;const app = express();&lt;/p&gt;

&lt;p&gt;var postData = {&lt;br&gt;
    'this':'this data will you post'&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;let axiosConfig = {&lt;br&gt;
    headers: {&lt;br&gt;
        'Authorization': 'Bearer your-apikey',&lt;br&gt;
        'Response-Format': 'JSON',&lt;br&gt;
        'Content-Type': 'application/json',&lt;br&gt;
        "Access-Control-Allow-Origin": "*",&lt;br&gt;
    }&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;axios.post('&lt;a href="https://link"&gt;https://link&lt;/a&gt; apikey', postData, axiosConfig)&lt;br&gt;
    .then((res) =&amp;gt; {&lt;br&gt;
        console.log(&lt;code&gt;RESPONSE RECEIVED: ${postData}&lt;/code&gt;, res);&lt;br&gt;
    })&lt;br&gt;
    .catch((err) =&amp;gt; {&lt;br&gt;
        console.log("AXIOS ERROR: ", err);&lt;br&gt;
    })&lt;/p&gt;

&lt;p&gt;axios.get('&lt;a href="https://link"&gt;https://link&lt;/a&gt; apikey')&lt;br&gt;
    .then(response =&amp;gt; {&lt;br&gt;
        console.log(response.data.created_at);&lt;br&gt;
    });&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {

} catch (error) {

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;axios.all([&lt;br&gt;
    axios.get('&lt;a href="https://link"&gt;https://link&lt;/a&gt; apikey'),&lt;br&gt;
    axios.get('&lt;a href="https://link"&gt;https://link&lt;/a&gt; apikey')&lt;br&gt;
])&lt;br&gt;
    .then(axios.spread((user1, user2) =&amp;gt; {&lt;br&gt;
        console.log('Date created: ', user1.data.created_at);&lt;br&gt;
        console.log('Date created: ', user2.data.created_at);&lt;br&gt;
    }));&lt;/p&gt;

</description>
      <category>axios</category>
    </item>
    <item>
      <title>how to build express js code faster</title>
      <dc:creator>Angga Lesmana</dc:creator>
      <pubDate>Mon, 01 Jun 2020 01:54:17 +0000</pubDate>
      <link>https://dev.to/anggachelsea/how-to-build-express-js-code-faster-21n2</link>
      <guid>https://dev.to/anggachelsea/how-to-build-express-js-code-faster-21n2</guid>
      <description>&lt;p&gt;Alright. let me share how to build expressjs code faster &lt;br&gt;
oke for the first you should visit a expressjs.com&lt;/p&gt;

&lt;p&gt;we can build a expressjs code use terminal with complieted&lt;br&gt;
first you should visit a link express.js and click for Getting Started and choose a express generator install express generator on your terminal npx express-generator and after that you get it&lt;/p&gt;

&lt;p&gt;create : myapp&lt;br&gt;
   create : myapp/package.json&lt;br&gt;
   create : myapp/app.js&lt;br&gt;
   create : myapp/public&lt;br&gt;
   create : myapp/public/javascripts&lt;br&gt;
   create : myapp/public/images&lt;br&gt;
   create : myapp/routes&lt;br&gt;
   create : myapp/routes/index.js&lt;br&gt;
   create : myapp/routes/users.js&lt;br&gt;
   create : myapp/public/stylesheets&lt;br&gt;
   create : myapp/public/stylesheets/style.css&lt;br&gt;
   create : myapp/views&lt;br&gt;
   create : myapp/views/index.pug&lt;br&gt;
   create : myapp/views/layout.pug&lt;br&gt;
   create : myapp/views/error.pug&lt;br&gt;
   create : myapp/bin&lt;br&gt;
   create : myapp/bin/www&lt;/p&gt;

&lt;p&gt;and open on your tools editor&lt;/p&gt;

</description>
      <category>express</category>
      <category>node</category>
    </item>
  </channel>
</rss>
