Small fixes and make it work with webpack#2
Small fixes and make it work with webpack#2yktoo wants to merge 2 commits intocornflourblue:masterfrom yktoo:master
Conversation
| // else return 400 bad request | ||
| connection.mockError(new Error('Username or password is incorrect')); | ||
| } | ||
| function fakeBackendFactory(backend: MockBackend, options: BaseRequestOptions, realBackend: XHRBackend) { |
There was a problem hiding this comment.
I tested it in Plunker, there was no error. What error do you get?
There was a problem hiding this comment.
ERROR in Error encountered resolving symbol values statically. Reference to a non-exported function (position 4:10 in the original .ts file), resolving symbol fakeBackendProvider in ...
There was a problem hiding this comment.
Okay, perhaps this function needs to be exported too (works for me with webpack as it is). Anyway, the first commit is safe to merge, the second one may be a bit controversial.
There was a problem hiding this comment.
Simply it should be export function fakeBackendFactory()
There was a problem hiding this comment.
Yes. Shall I add commit this one?
There was a problem hiding this comment.
I tested the change and it seems good.
Hi Jason, thanks for the great tutorial! I fixed a couple of small things in HTML templates, and also refactored fake-backed to make it work with
webpack, too (webpack is used by default in recent versions of angular-cli, and it won't support lambda for factory).