<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Windy with Angular]]></title><description><![CDATA[<p dir="auto">Is there any guide for making this work in angular?<br />
I've tried a few things to get "hello world" up and running  but so far cant make anything happen!</p>
]]></description><link>https://community.windy.com/topic/17845/windy-with-angular</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 14:13:13 GMT</lastBuildDate><atom:link href="https://community.windy.com/topic/17845.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Sep 2021 12:06:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windy with Angular on Tue, 19 Oct 2021 08:38:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> you may have to debug whats going on there but you could also remove the windyBoot part but than you might get some other errors when "reloading" windy</p>
]]></description><link>https://community.windy.com/post/90117</link><guid isPermaLink="true">https://community.windy.com/post/90117</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Tue, 19 Oct 2021 08:38:02 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 07:29:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a>  I implemented AfterViewInit, but something is still missing.  There is also an error that is connected to windyboot.</p>
<p dir="auto"><img src="/assets/uploads/files/1634541516888-5b9fc91d-74da-4151-90ac-4ab830138477-image.png" alt="5b9fc91d-74da-4151-90ac-4ab830138477-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">If it's not too much of a trouble, can you send me the code example with all the dependencies? I can't get the one provided to work since I lack the knowledge to do so. I also had to remove the LOAD_CONFIG objects, like you said. Also, thanks for all the help. This is the only time I got some insight on how to make this thing work</p>
]]></description><link>https://community.windy.com/post/90049</link><guid isPermaLink="true">https://community.windy.com/post/90049</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Mon, 18 Oct 2021 07:29:00 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 07:03:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> you need to implement this in order to get the ngAfterViewInit function to be called<br />
if that is not called, sure your map will not be loaded<br />
<a href="https://angular.io/guide/lifecycle-hooks" rel="nofollow ugc">https://angular.io/guide/lifecycle-hooks</a></p>
]]></description><link>https://community.windy.com/post/90039</link><guid isPermaLink="true">https://community.windy.com/post/90039</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Mon, 18 Oct 2021 07:03:47 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 07:03:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a> oh sry, i do get some errors</p>
<p dir="auto"><img src="/assets/uploads/files/1634540533007-dd793fba-231d-4555-8f5b-462ee16d71b2-image.png" alt="dd793fba-231d-4555-8f5b-462ee16d71b2-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.windy.com/post/90038</link><guid isPermaLink="true">https://community.windy.com/post/90038</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Mon, 18 Oct 2021 07:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 07:00:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a> I actually don't get any errors when executing that code. It is just a blank screen. AfterViewInit ? May I ask what is that?</p>
]]></description><link>https://community.windy.com/post/90037</link><guid isPermaLink="true">https://community.windy.com/post/90037</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Mon, 18 Oct 2021 07:00:53 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 06:47:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> i just saw that you are not implementing AfterViewInit in your example</p>
]]></description><link>https://community.windy.com/post/90036</link><guid isPermaLink="true">https://community.windy.com/post/90036</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Mon, 18 Oct 2021 06:47:38 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 06:45:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> in the end you are calling the windyInit function from the loaded windy scripts<br />
do you get any errors you could provide?<br />
you also could set the method on timeout and retry it on failure (maybe the scripts are not yet loaded)</p>
]]></description><link>https://community.windy.com/post/90035</link><guid isPermaLink="true">https://community.windy.com/post/90035</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Mon, 18 Oct 2021 06:45:38 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Mon, 18 Oct 2021 06:13:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a> Apologies, I did not pay attention when I was replying. Do I have to call the scripts through typescript? I thought it was enough to reference them in HTML. I am sorry for being a nuisance, but I am new to this. :(</p>
]]></description><link>https://community.windy.com/post/90031</link><guid isPermaLink="true">https://community.windy.com/post/90031</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Mon, 18 Oct 2021 06:13:58 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Wed, 13 Oct 2021 14:48:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> btw you should not post your api-key in public forums</p>
<p dir="auto">where do you load the scripts?<br />
yes i'm perfectly fine with using windy in angular</p>
]]></description><link>https://community.windy.com/post/89676</link><guid isPermaLink="true">https://community.windy.com/post/89676</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Wed, 13 Oct 2021 14:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Wed, 13 Oct 2021 12:25:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a> Hi, me again. I tried cutting out everything that has to do with LoadConfig and WindyScriptLoaderService, but still no good. How come Angular can't just read java scripts from HTML? Were you able to do it in your Angular project?</p>
<pre><code>import { DatePipe } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { MatDialog, MatDialogRef, MatDialogModule } from '@angular/material/dialog';
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { Table } from 'primeng/table';
import { combineLatest, Observable, Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
import { environment } from 'src/environments/environment';
import { isAppIdentity } from '../../oc-core/app-defs/app-identity';
import { appLocationEndpointMap } from '../../oc-core/app-defs/app-location-endpoint-map';
import { CrudGenericService } from '../../oc-core/services/crud-generic.service';
import { BunkerFormComponent } from '../bunker-form/bunker-form.component';
import { VoyageCallsModel } from '../models/voyage-calls.model';
import { VoyageOverviewModel } from '../models/voyage-overview.model';
import { ScriptLoaderModule } from 'ngx-script-loader'
import { WindyScriptLoaderService } from 'windy'

declare function windyInit(options, callback);
@Component({
  selector: 'app-pool-overview',
  templateUrl: './pool-overview.component.html',
  styleUrls: ['./pool-overview.component.css'],
  
})


export class PoolOverviewComponent implements OnInit {

  private subscription: Subscription = new Subscription();
  
  @ViewChild(Table, {static: true}) dataTableComponent: Table;

  navStart: Observable;

  private windyMap: any;


  constructor(private route: ActivatedRoute, private router: Router, private crudService: CrudGenericService, private httpClient: HttpClient, 
    private fb: FormBuilder, private modalService: NgbModal, public dialog: MatDialog, public datepipe: DatePipe) { 
    this.navStart = router.events.pipe(
      filter(evt =&gt; evt instanceof NavigationStart)
    ) as Observable;
  }

  ngOnInit(){

  }

  ngAfterViewInit(): void {
   
      const options = {
        // Required: API key
        key: 'MdrN6Cm3LsiP40kv2Y8SUyXyhk4HEer4', // REPLACE WITH YOUR KEY !!!

        // Put additional console output
        verbose: false,

        // Optional: Initial state of the map
        lat: 35,
        lon: -30,
        zoom: 3
      };

      if (!window['copy_of_W']) {
        window['copy_of_W'] = Object.assign({}, window['W']);
      }
      if (window['W'].windyBoot) {
        window['W'] = Object.assign({}, window['copy_of_W']);
      }

      windyInit(options, windyAPI =&gt; {
        this.windyMap = windyAPI;
        this.windyMap.map.options.minZoom = 0;
        this.windyMap.map.options.maxZoom = 18;
      });

  }


}


</code></pre>
]]></description><link>https://community.windy.com/post/89664</link><guid isPermaLink="true">https://community.windy.com/post/89664</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Wed, 13 Oct 2021 12:25:10 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Wed, 13 Oct 2021 07:49:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/filipovski1" aria-label="Profile: filipovski1">@<bdi>filipovski1</bdi></a> this shouldn't be actually in the example and you don't need it in the end except you want some generic configs and dynamic loading.<br />
So remove the config and be sure to put the windy js links into your index.html</p>
]]></description><link>https://community.windy.com/post/89627</link><guid isPermaLink="true">https://community.windy.com/post/89627</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Wed, 13 Oct 2021 07:49:41 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Wed, 13 Oct 2021 07:19:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lefunkyfancy" aria-label="Profile: lefunkyfancy">@<bdi>lefunkyfancy</bdi></a> Hello, I am trying to do this but am getting some errors. How do I get dependencies for LoadConfig, LOAD_CONFIG and WindyScriptLoaderService?</p>
<p dir="auto"><img src="/assets/uploads/files/1634109512967-bc6539d3-19b1-47f2-835c-529a88933efb-image.png" alt="bc6539d3-19b1-47f2-835c-529a88933efb-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.windy.com/post/89613</link><guid isPermaLink="true">https://community.windy.com/post/89613</guid><dc:creator><![CDATA[filipovski1]]></dc:creator><pubDate>Wed, 13 Oct 2021 07:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to Windy with Angular on Tue, 14 Sep 2021 08:00:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ltaggart" aria-label="Profile: ltaggart">@<bdi>ltaggart</bdi></a></p>
<p dir="auto">Hey, as long as you are loading the scripts this should be like a basic setup to get it working.</p>
<p dir="auto">(i can't write the div in one line since it will disappear than lol)</p>
<p dir="auto"><strong>HTML</strong></p>
<pre><code>&lt;
div #windyMap id="windy"&gt;
</code></pre>
<p dir="auto"><strong>TS</strong></p>
<pre><code>declare function windyInit(options, callback);

@Component({
  selector: 'windy',
  templateUrl: './windy.component.html',
  styleUrls: ['./windy.component.scss'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class WindyComponent implements OnInit, AfterViewInit, OnDestroy {
   @ViewChild('windyMap', {static: true}) windyMapElementRef: ElementRef;
 
  private _config: LoadConfig;
  private windyMap: any;

  constructor(@Inject(LOAD_CONFIG) private config: LoadConfig,             
              private _cdr: ChangeDetectorRef,
              private _windyScriptLoaderService: WindyScriptLoaderService) {
    this._config = config || {};
  }

  ngOnInit(): void {
    if (!this._config.apiKeyWindy) {
      throwError('Windy api key is missing!');
    }
  }

  ngAfterViewInit(): void {
    this._windyScriptLoaderService.load().then((test) =&gt; {
      const options = {
        // Required: API key
        key: 'APIKEY', // REPLACE WITH YOUR KEY !!!

        // Put additional console output
        verbose: false,

        // Optional: Initial state of the map
        lat: 35,
        lon: -30,
        zoom: 3
      };

      if (!window['copy_of_W']) {
        window['copy_of_W'] = Object.assign({}, window['W']);
      }
      if (window['W'].windyBoot) {
        window['W'] = Object.assign({}, window['copy_of_W']);
      }

      windyInit(options, windyAPI =&gt; {
        this.windyMap = windyAPI;
        this.windyMap.map.options.minZoom = 0;
        this.windyMap.map.options.maxZoom = 18;
      });
    });
  }

  ngOnDestroy() {
    this._windyScriptLoaderService.removeScripts();
  }
}   
</code></pre>
]]></description><link>https://community.windy.com/post/87334</link><guid isPermaLink="true">https://community.windy.com/post/87334</guid><dc:creator><![CDATA[LeFunkyFancy]]></dc:creator><pubDate>Tue, 14 Sep 2021 08:00:01 GMT</pubDate></item></channel></rss>