Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useStaticFilesLoader() throws TypeError #10

Closed
robhicks opened this issue Dec 24, 2015 · 3 comments
Closed

useStaticFilesLoader() throws TypeError #10

robhicks opened this issue Dec 24, 2015 · 3 comments

Comments

@robhicks
Copy link

I modified your ng2-play fork to use the static file loader. It throws the following error:

angular2.js:23514 EXCEPTION: Error during instantiation of HelloApp!.BrowserDomAdapter.logError @ angular2.js:23514BrowserDomAdapter.logGroup @ angular2.js:23525ExceptionHandler.call @ angular2.js:1145(anonymous function) @ angular2.js:14801NgZone._notifyOnError @ angular2.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.js:23514 ORIGINAL EXCEPTION: TypeError: this.http.get(...).map is not a functionBrowserDomAdapter.logError @ angular2.js:23514ExceptionHandler.call @ angular2.js:1154(anonymous function) @ angular2.js:14801NgZone._notifyOnError @ angular2.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.js:23514 ORIGINAL STACKTRACE:BrowserDomAdapter.logError @ angular2.js:23514ExceptionHandler.call @ angular2.js:1157(anonymous function) @ angular2.js:14801NgZone._notifyOnError @ angular2.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.js:23514 TypeError: this.http.get(...).map is not a function
    at TranslateStaticLoader.getTranslation (translate.service.ts:40)
    at TranslateService.getTranslation (translate.service.ts:119)
    at TranslateService.use (translate.service.ts:99)
    at new HelloApp (hello.js:36)
    at angular2.js:1376
    at Injector._instantiate (angular2.js:11920)
    at Injector._instantiateProvider (angular2.js:11859)
    at Injector._new (angular2.js:11849)
    at InjectorInlineStrategy.instantiateProvider (angular2.js:11609)
    at ElementInjectorInlineStrategy.hydrate (angular2.js:13234)BrowserDomAdapter.logError @ angular2.js:23514ExceptionHandler.call @ angular2.js:1158(anonymous function) @ angular2.js:14801NgZone._notifyOnError @ angular2.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.js:5700run @ angular2-polyfills.js:141(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243microtask @ angular2.js:5751run @ angular2-polyfills.js:138(anonymous function) @ angular2.js:5719zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305Promise.resolve (async)(anonymous function) @ angular2-polyfills.js:235asap @ angular2-polyfills.js:1232scheduleMicrotask @ angular2-polyfills.js:250(anonymous function) @ angular2-polyfills.js:242lib$es6$promise$$internal$$fulfill @ angular2-polyfills.js:1454lib$es6$promise$$internal$$resolve @ angular2-polyfills.js:1435resolvePromise @ angular2-polyfills.js:1559load @ system.src.js:1017xhr.onreadystatechange @ system.src.js:1026run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111XMLHttpRequest.send (async)fetchTextFromURL @ system.src.js:1049(anonymous function) @ system.src.js:1555lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:1558lib$es6$promise$promise$$Promise @ angular2-polyfills.js:1849(anonymous function) @ system.src.js:1554(anonymous function) @ system.src.js:2446(anonymous function) @ system.src.js:3011(anonymous function) @ system.src.js:3244(anonymous function) @ system.src.js:3840(anonymous function) @ system.src.js:4031(anonymous function) @ system.src.js:4277(anonymous function) @ system.src.js:326run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
angular2.js:23514 ERROR CONTEXT:
@robhicks robhicks changed the title useStaticFilesLoader() throws ypeError useStaticFilesLoader() throws TypeError Dec 24, 2015
@robhicks
Copy link
Author

Here's a link to my fork: https://github.com/robhicks/ng2-play

@ocombe
Copy link
Collaborator

ocombe commented Dec 25, 2015

Thanks ! That's why I need to add more tests, probably something that broke during one of the last alphas :)

@ocombe
Copy link
Collaborator

ocombe commented Dec 27, 2015

Fixed in 1.2.4, thanks for the report !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants