angular-next icon indicating copy to clipboard operation
angular-next copied to clipboard

Real example with dependency loading

Open maku opened this issue 11 years ago • 5 comments

It would be good to have an example where the js dependencies are also loaded via systemjs (or better a jspm example).

In the current example (color-slider) the js libs are loaded through script tags. I have problems to get a test app running when I try to load the libs via SystemJs

maku avatar Feb 17 '15 08:02 maku

agreed. I'm working on a jspm example. It should be up some time next week. I'll keep you posted.

robianmcd avatar Feb 17 '15 15:02 robianmcd

I added an example project that uses jspm. https://github.com/robianmcd/angular-next/tree/gh-pages/examples/hello-jspm

robianmcd avatar Feb 24 '15 01:02 robianmcd

Thank you for providing jspm support (looks good - would only suggest to load angular also via import)

I would be curious how you use it with e.g. traceur and offline compilation (the example uses on the fly transpilation) Do you have any idea?

BTW, do you use angular-next in real projects? I would like write future projects as compatible as possible with Angular2 and your project looks very promising...

maku avatar Feb 24 '15 07:02 maku

jspm has a bundle command you can use to compile everything offline and bundel it into one file: https://github.com/jspm/jspm-cli/wiki/Getting-Started#6-bundle-for-production

I'll modify the example to incorporate bundling and requiring angular 1 from jspm.

I wouldn't recommend using angular-next in production yet. Mainly because Angular 2 is still pretty undocumented and volatile so angular-next will need to change every time something changes in Angular 2.

robianmcd avatar Feb 24 '15 18:02 robianmcd

Great, thank you

maku avatar Feb 25 '15 07:02 maku