how to convert angular project into an api?… as well as google maps works

  angular, html, iframe, nested

Actually the angular project works in a iframe to embebed a angular project in html pages, and works well!


But my boss ask me to we can get more far. He takes the idea from youtube api, for a better and correct integration

As you can see youtube api do this:

  1. loads the IFrame Player API code asynchronously
  2. calls functions when the video player is ready, and this code have other code that invoque an api with the method onYouTubeIframeAPIReady()

We want something more simple.

  1. load the first min.js code async
  2. get the resources to make something like this:

    var example = new Example();
    example.initProject(); // and remplaze an div tag with angular project

the html will must look something like this:

<div id="angular-app"></div>

I try to find examples for this in angular to try to do my task.
Are they have some examples to help me o give some documentation to do this?

I think that there exist some npm library that makes this for you.. I not shure

Thanks a lot

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.