I am trying to integrate an standalone page made with angular2 with typescript to my existing Play 2 framework. I have been compiling typescript to javascript using a plugin - https://github.com/mumoshu/play2-typescript
So on my standalone, i am able to following example given on auth0 angular-2-series-part-3-using-http <https://auth0.com/blog/2015/10/15/angular-2-series-part-3-using-http/> to make http get request from angular 2 component to the server. However, when I imported my standalone app into play 2 framework, modules in side angular2/http doesn't get called. I simplified my page to the following. ///<reference path = "../libs/angular2/anguar2.d.ts" ///<reference path = "../libs/angular2/http.d.ts" import {bootstrap, Component, View} from 'angular2/angular2'; import {Http, HTTP_PROVIDERS} from 'angular2/http'; @Component({ selector: 'my-app' }) @View({ template: ` <div> Test </div> `, directives: [FORM_DIRECTIVES] }) class AppComponent { constructor(http: Http){ } } bootstrap(AppComponent, [HTTP_PROVIDERS]); However, whenever I load the page, it blanks out without giving any errors on browser console. I stepped though the code, found that all ts files are successfully compiled into js files, but program execution seems to only execute the first line of .js file and skipping over to the body inside function(exports_1){...} (function(System) {System.register(['angular2/angular2', 'angular2/http'], function(exports_1) { ... })(System); This problem only happens if I inject Http into the AppComponent constructor, or bootstraps HTTP_PROVIDERS into the providers array. I have tried with alpha 39, 44 and 45, but none of them works. I am really stuck with this problem since there is no error message showing up. Let me know if you have any ideas what went wrong! - Cindy -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
