<?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>Forem: Vuvu Videos 🇿🇦</title>
    <description>The latest articles on Forem by Vuvu Videos 🇿🇦 (@videosvuvu).</description>
    <link>https://forem.com/videosvuvu</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%2F997982%2Fb1d6761b-921b-4f8b-b48c-5c3f2539858b.jpg</url>
      <title>Forem: Vuvu Videos 🇿🇦</title>
      <link>https://forem.com/videosvuvu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/videosvuvu"/>
    <language>en</language>
    <item>
      <title>Api call does not show in developer console (Chrome)</title>
      <dc:creator>Vuvu Videos 🇿🇦</dc:creator>
      <pubDate>Wed, 28 Dec 2022 17:36:01 +0000</pubDate>
      <link>https://forem.com/videosvuvu/api-call-does-not-show-in-developer-console-chrome-5gdj</link>
      <guid>https://forem.com/videosvuvu/api-call-does-not-show-in-developer-console-chrome-5gdj</guid>
      <description>&lt;p&gt;Good Day Everyone , &lt;/p&gt;

&lt;p&gt;This is my first post in this forum , i am new to Angular. &lt;/p&gt;

&lt;p&gt;i have a service that i created and it is defined like this&lt;br&gt;
&lt;strong&gt;TrendingChannelsService.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http'; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Injectable({
  providedIn: 'root'
})
export class TrendingChannelsService {

  constructor(private http:HttpClient) {} 

   GetChannels() :any
   {
      let url ="https://trovadating.com/TrovaTVApi/channels";

      return this.http.get&amp;lt;any&amp;gt;(url);

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

&lt;/div&gt;



&lt;p&gt;and i have imported the http namespace in the &lt;strong&gt;app.module.ts&lt;/strong&gt; like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import { HttpClientModule } from '@angular/common/http';

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

&lt;/div&gt;



&lt;p&gt;and in the imports like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
  imports: [  
    BrowserModule, 
    FontAwesomeModule  ,**HttpClientModule**,
   RouterModule.forRoot(appRoutes)
  ], 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and in my component i am using the service like this &lt;br&gt;
&lt;strong&gt;trending.component.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { TrendingChannelsService } from './services/TrendingChannelsService';
import { Component, OnInit } from '@angular/core';  
import { HttpClientModule } from '@angular/common/http';

@Component({
    selector: 'trending', 
    templateUrl: 'trending.component.html', 
    styleUrls:['osahan.scss','bootstrap.min.scss' ,
    'owl.carousel.scss','owl.theme.scss','live.scss','custom.scss','all.min.css' ]
})
export class trending  implements OnInit
{   
    data : any;

    constructor(private objchannel : TrendingChannelsService) 
    { 
    }


        ngOnInit()  
        { 
                    this.objchannel.GetChannels().subscribe((result: any)=&amp;gt;{

                      this.data = result;

                    console.warn("results", this.data);
                    console.log(result); 

             } );

            }


} 

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

&lt;/div&gt;



&lt;p&gt;and for some reason i dont see anything logged in the developer console, i used both .log and warn but my browser(Chrome) dont show the returned data. if you can take the URL for the service you will see it will give json data back. &lt;/p&gt;

&lt;p&gt;Thanks &lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
