GithubHelp home page GithubHelp logo

microservice-angular-iframe's Introduction

Angular and Microservices: Micro-Frontends with iframes

Features

  • Meta Router for creating shell app that loads routed applications ("child apps") using iframes
  • iframes are created at runtime
  • Allows jumping to a specific route within child app
  • Synchronizing child app's routes with the shell's route
  • Resizes the iframes to prevent a scrollbar within the iframe
  • Written in VanillaJS to allow shell app to be as slim as possible
  • Tested with HashLocationStrategy
  • Tested w/ Chrome, Firefox, Edge and IE 11

Config

  • see index.html for setting up the meta routes
  • see app-a/src/app/index.html for initializing child apps
  • see app-a/src/app/app.component.ts for synchronizing the child app's route with the shell's route

Trying it out

  1. Install the libs for each child app and build them:
    cd app-a
    npm install
    ng build

    cd ..

    cd app-b
    npm install
    ng build

    cd ..
  1. Start the shell app with a web server of your choice, e. g. http-server
    npm install -g http-server
    http-server -o

Blog

More infos about this and Angular can be found on my blog.

microservice-angular-iframe's People

Contributors

manfredsteyer avatar

Stargazers

Rodrigo Puls avatar Caroline avatar Yutamago avatar Shang Zhan avatar Felipe Cabreira avatar luo0412 avatar Vadym Kozak avatar Aman Ullah avatar  avatar Michał Wilczyński avatar GAURAV avatar Jervie Vitriolo avatar YONE avatar  avatar Lightman Wang avatar nasa.wang avatar Fengda Huang avatar

Watchers

James Cloos avatar Belan avatar Johann Borg avatar Jervie Vitriolo avatar  avatar

microservice-angular-iframe's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.