<?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: Nando AM</title>
    <description>The latest articles on DEV Community by Nando AM (@nokiz).</description>
    <link>https://dev.to/nokiz</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%2F183979%2F1f98bb48-3b9d-41b6-8350-715904ced081.jpeg</url>
      <title>DEV Community: Nando AM</title>
      <link>https://dev.to/nokiz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nokiz"/>
    <language>en</language>
    <item>
      <title>ngx-smart-modal 'onDataAdded' called many times</title>
      <dc:creator>Nando AM</dc:creator>
      <pubDate>Fri, 30 Aug 2019 10:50:15 +0000</pubDate>
      <link>https://dev.to/nokiz/ngx-smart-modal-ondataadded-called-many-times-4i2c</link>
      <guid>https://dev.to/nokiz/ngx-smart-modal-ondataadded-called-many-times-4i2c</guid>
      <description>&lt;p&gt;I'm new using angular8 and the library ngx-smart-modal to make a list of clients each one with one button to remove him from the list. When I click on the button I show a confirm modal and when click on accept, passes the client code to another compoment wich search that code and remove the affected index from the array list.&lt;/p&gt;

&lt;p&gt;Problem is: in the first modal opened, 'onDataAdded' is called once (expected behavior). In the second is called twice (not expected) and so on...&lt;/p&gt;

&lt;p&gt;When I click on 'delete', it triggers this function from 'clients' component which opens the confirmation modal and waits for response (onDataAdded):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;delClientModal( index: number ) {
  this.clientToRemove = this.clients[index];
  this.clientService._passClient(this.clients[index]);
  this.ngxSmartModalService.getModal('delClientModal').open();
  this.ngxSmartModalService.get('delClientModal').onDataAdded.subscribe((data: any) =&amp;gt; {
    const indexToRemove = this.clients.findIndex(i =&amp;gt; i.clientcode === data);
    if (indexToRemove &amp;gt;=  0) {
      this.clients.splice(this.clients.findIndex(i =&amp;gt; i.clientcode === data), 1);
    }
  });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I click on accept, it triggers this function from 'client' component wich send the client code to clientService (for api operations) and set the data to de modal for 'onDataAdded' to catch it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;delClient(clientcode: string) {
    this.clientService._deleteClient(this.client);
    this.ngxSmartModalService.setModalData(clientcode, 'delClientModal');
    this.ngxSmartModalService.resetModalData('delClientModal');
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What I'm not getting right?&lt;/p&gt;

</description>
      <category>help</category>
      <category>angular</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Bad experiences in technicolor (part 2)</title>
      <dc:creator>Nando AM</dc:creator>
      <pubDate>Fri, 16 Aug 2019 10:44:00 +0000</pubDate>
      <link>https://dev.to/nokiz/bad-experiences-in-technicolor-part-2-1fpg</link>
      <guid>https://dev.to/nokiz/bad-experiences-in-technicolor-part-2-1fpg</guid>
      <description>&lt;p&gt;I'm not particularly proud of this part of my formational/professional life, but I'm not exactly ashamed neither.&lt;/p&gt;

&lt;p&gt;After &lt;a href="https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm"&gt;I lose my first job&lt;/a&gt;, I enrolled into university and then dropped out of it.&lt;/p&gt;

&lt;h3&gt;Why?&lt;/h3&gt;

&lt;p&gt;After 4 years of studying middle and upper computer programming and a lost job, I though that the logical step was to get into university.&lt;/p&gt;

&lt;p&gt;Take in mind that my previous formation was not in the university but it gave me a solid framework to understand, research and solve any problem I could encounter in my work life.&lt;/p&gt;

&lt;p&gt;But I haven't had a university degree.&lt;/p&gt;

&lt;p&gt;I was one of the 5 oldest persons in classroom (of a 50 people classroom). My classmates where mostly in his 19ish while I was 27 and that was like a step backwards to me.&lt;/p&gt;

&lt;p&gt;I also had idealized university. I though that there I would be able to focus and learn about the things that most interested me but, friend, I was so wrong... That was like high school part 2: Lectures - Homework - Exam.&lt;/p&gt;

&lt;p&gt;4 months after I was not attending to any classes and at the end of the semester, I officially left.&lt;/p&gt;

&lt;h3&gt;The lesson, dear reader&lt;/h3&gt;

&lt;p&gt;Like in the &lt;a href="https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm"&gt;first part of this post&lt;/a&gt;, what at first I thought it will be an amazing experience, revealed as a frustrating and disappointing one. Do you see a pattern here?&lt;/p&gt;

&lt;p&gt;But I don't think the experience was completely negative. I knew when I had enough and left just in time to not to lose more time, and that was a big lesson.&lt;/p&gt;

&lt;p&gt;I'll go on in part 3. Thanks for reading :)&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>personal</category>
    </item>
    <item>
      <title>Bad experiences in technicolor (part 1)</title>
      <dc:creator>Nando AM</dc:creator>
      <pubDate>Fri, 09 Aug 2019 09:46:22 +0000</pubDate>
      <link>https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm</link>
      <guid>https://dev.to/nokiz/bad-experiences-in-technicolor-part-1-8cm</guid>
      <description>&lt;p&gt;As my first post at this wonderful community, I thought I could write something about my experience in the field of web developing. This approach, although, would be boring and uninteresting since it will be very similar to everyone else's career in the same field.&lt;/p&gt;

&lt;p&gt;So I'm going to write about f***ed up situations I've passed through my career so far (12 years!) because these will be different and maybe (hopely) I had learned some valuable things from them.&lt;/p&gt;

&lt;h3&gt;My beginnings&lt;/h3&gt;

&lt;p&gt;After 2 years of middle studies on computer programming (with excellent marks, I must admit), I get to work (unpaid) for a local company with a great reputation plus I get to work with one of my best friends who already was working there. Months later, my friend left the job for better opportunities. I started to get paid (poorly) while studying the upper grade and also passing through difficult times personally.&lt;/p&gt;

&lt;p&gt;Two more years later I finish my computer studies and ask for a raise. I was working hard and bringing young blood and ideas to the company. As the opposite, I get laid off and the guy who replaces me is a very close friend of the boss. Great.&lt;/p&gt;

&lt;h3&gt;The lesson, dear reader&lt;/h3&gt;

&lt;p&gt;Like we say over here, it's not gold everything that shines. Since I was a child I dreamed about working with computers and later about programming. The company at first seemed perfect for me: very close to my home, working with my best friend, good reputation... But not everything is what it seems and usually you need to go deeper to know the truth.&lt;/p&gt;

&lt;p&gt;I'll go on in part 2. Thanks for reading :)&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>personal</category>
    </item>
  </channel>
</rss>
