-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Allow overriding ResourceLoader #13286
Comments
You can provide your own impl |
@DzmitryShylovich i tried overriding like you have mentioned. but its still using internal resourceloader for component templateUrl request. |
You have to provide it using this method. |
@frederikschubert thanks that worked. do you have an idea on how to do the same in actual application (instead of unit test configuration) ? |
|
@DzmitryShylovich @frederikschubert thanks for pointing out the code. i was able to use below code to get it working. platformBrowserDynamic([{ used below to override it in unit testbed. |
In case it is useful for someone, here is a working example: https://github.com/ericminio/learning-typescript/blob/master/test/mocha.shim.js |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ... (check one with "x")
Current behavior
Allow overriding internal ResourceLoader implementation for templateUrl support in component. when components are defined with templateUrl and respective unit tests are taking long time to complete (due to karma requesting template url each unit test)
Expected behavior
allow override resourceloader to load template url content without actual template url http requests.
Minimal reproduction of the problem with instructions
N/A
What is the motivation / use case for changing the behavior?
when components are defined with templateUrl and respective unit tests are taking long time to complete (due to karma requesting template url each unit test). each unit test take about 1 sec to complete with this approach and this is leading to long unit test execution time.
Please tell us about your environment:
Windows 7 64 16GM RAM, VSCode IDE
Angular version: 2.0.4
Browser: PhantomJS/Chrome
Language: [TypeScript 2.0.10]
Node (for AoT issues): = 6.9.1
The text was updated successfully, but these errors were encountered: