2

How do I get my Angular2 project running in Plunker that I can give other people examples of some functionalities without recreating every single file and resource?

moessi774
  • 1,029
  • 2
  • 12
  • 19
  • if you are using angular CLI than use https://stackblitz.com for sharing your angular project. – Akash Aug 08 '18 at 08:21

1 Answers1

1

You can use core http://plnkr.co/edit/?p=preview with all @angular libraries, adjust systemjs.config file to add your special libs. It uses latest RC5 but you can use any.

import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: '<h1>My First Angular 2 App</h1>'
})
export class AppComponent { }

Add your special files and you are done.

DicBrus
  • 1,291
  • 9
  • 9
  • 1
    I got the impression there is a way to get a Plunker from a Github repo or similar but haven't found details. Do you know about such a way? – Günter Zöchbauer Aug 23 '16 at 06:08
  • I'm not sure it's possible... where did you get this idea? – DicBrus Aug 23 '16 at 07:06
  • I think I saw this mentioned somewhere. It's a while ago. I kept looking for hints, but have seen any. It also seems the Angular team is generating them somehow from their examples in the GitHub repo but I don't know how. – Günter Zöchbauer Aug 23 '16 at 07:11
  • I think it is good idea to keep plunker's examples small and clear, that tremendously helps to understand code (for those who reads and for author also). – DicBrus Aug 23 '16 at 07:29
  • 1
    Sure but GitHub repos don't need to be big ;-) and it would make it easy to try them locally as well. – Günter Zöchbauer Aug 23 '16 at 07:34
  • I can't see why it would not be possible. Just set up systemjs mapping to point to rawgithubuser.com, which would proxy rawcontents. Maybe proxy is not even needed. – dfsq Aug 23 '16 at 07:38
  • Ok I thought there would be an easier way of doing it. But with the simplicity thing you are right. – moessi774 Aug 23 '16 at 09:05