Search code examples
angularjsangulartypescriptsystemjsplunker

404 error on Plunker for Angular2 code?


    Please check this plunk link

   I am 404 error, I am unable to find it , please anyone can solve it, and update my plunk

Here the link https://plnkr.co/edit/rKxWDg?p=preview


Solution

  • 1) Your base href is path invalid for plunker

    A live coding environment like Plunker sets the application base address dynamically so you can't specify a fixed address. That's why the example code replaces the with a script that writes the tag on the fly.

    <script>document.write('<base href="' + document.location + '" />');</script>
    

    You should only need this trick for the live example, not production code.

    https://angular.io/docs/ts/latest/guide/router.html#!#set-the-lt-base-href-

    2) If you want to use DynamicDetail component within AppComponent template you have to export it from yBusinessModule

    3) You need to add router-outlet within DynamicDetail template

    Modified plunker