Comments (7)
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.
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.
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.
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.
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.
@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.
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)
- Problem with the third option: app/bootstrap not found HOT 1
- coursier.ResolutionException: Conflict(s) in dependency resolution HOT 2
- Property not passed to the top level component HOT 2
- Support scss instead of css HOT 1
- Update the readme for latest changes
- Migrating from SBT to Maven HOT 1
- Running test under karma with jasmine HOT 1
- Unexpected exception languageServiceHost.js:21 ReferenceError: Map is not defined HOT 3
- how to use libarary.such as ng2-bootstrap HOT 1
- Tslint show JsFailure message "Set is not defined". HOT 1
- Links broken HOT 2
- Dependencies are broken HOT 3
- How to run Typescript tests HOT 6
- empty lib directory HOT 1
- activator error , please help me, thanks a lot HOT 2
- unresolved dependency: org.webjars.npm#through HOT 1
- Runtime exception: Invalid regular expression HOT 3
- Recommended IDE? HOT 1
- rxjs dependencies passed compilation but failed at runtime. HOT 3
- Sbt test cannot test running because find Linter.createProgram().
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-angular-typescript.g8.