Giter Site home page Giter Site logo

Comments (7)

joost-de-vries avatar joost-de-vries commented on May 21, 2024

I couldn't replicate your issue. I called sbt stage and then ran the binary and the NG2 application starts just fine.

from play-angular-typescript.g8.

joost-de-vries avatar joost-de-vries commented on May 21, 2024

Since I couldn't replicate the issue and haven't heard from your for quite a while I'm closing the issue.

from play-angular-typescript.g8.

avanwyk avatar avanwyk commented on May 21, 2024

I know you have closed the issue, but I am having the same problem if I follow your readme.

Running:
sbt stage
it works, however, JS is served as more than one file.

Running:
sbt stage -tsCompileMode=stage
it gets the same error as @golechwierowicz :

zone.min.js:1 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:9000/assets/app/main.js(…)
e.invoke @ zone.min.js:1
n.run @ zone.min.js:1
(anonymous function) @ zone.min.js:1
e.invokeTask @ zone.min.js:1
n.runTask @ zone.min.js:1
a @ zone.min.js:1
invoke @ zone.min.js:1

from play-angular-typescript.g8.

joost-de-vries avatar joost-de-vries commented on May 21, 2024

The template3 variant hasn't been ported to ng2 final yet.
It's mostly an ng2 matter with a little bit of knowledge of Play required.

What needs to be done is that the <script/> downloads and the SystemJs config need to be updated for Angular2. What's different in the SystemJs config is that either the config shouldn't do anything about loading the app code and we should load it using a script tag. Or we should configure SystemJs to go to this single file for all app modules.

I'm pretty busy the coming weeks. A pull request is welcome.

from play-angular-typescript.g8.

camilosampedro avatar camilosampedro commented on May 21, 2024

I have tried to run the single javascript file compilation. The only problem I have is that in the generated main.js there are a lot of references to Angular2 dependencies. For example, there is a line that is:

System.register("app/app/app.component", ['@angular/core'], function //... 

All those files are being requested by the browser and they are not shipped with that main.js, they still cannot be accessed because there is nothing on localhost:9000/@angular/core.

The only javascript files referenced in this index2.html are

  • angular2-polyfills.js
  • system.js
  • Rx.js
  • angular2.dev.js
  • main.js

None of them having problems loading.

I run using activator -DtsCompileMode=stage ~run

I know this template is not ported yet for this template, and I'm really sorry for bothering you with this 😓 , I just don't really know what is the missing part on this. Are dependencies not being compiled inside main.js?

I attach my main.js, I have changed the HTML System import script for:

<script>
    System.import('app/main')
        .catch(console.error.bind(console));
</script>

I don't really have any urges with this, so don't worry.

Thank you! 😃

from play-angular-typescript.g8.

SadatAnwar avatar SadatAnwar commented on May 21, 2024

@joost-de-vries any updates here? I know you said you are busy, but just wanted to know if you will be looking at this anytime soon? I too am unable to get the index2 to work. I am getting 404 of angular2-polyfills.js, angualr2.dev.js files

Thanks

from play-angular-typescript.g8.

museOnSite avatar museOnSite commented on May 21, 2024

Hi,
Some updates about single js file compilation ? I'm struggling too running my app in production.
Thanks

from play-angular-typescript.g8.

Related Issues (20)

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.