-
Notifications
You must be signed in to change notification settings - Fork 386
Small fixes and make it work with webpack #2
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still I can see the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it in Plunker, there was no error. What error do you get?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, perhaps this function needs to be export
ed 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply it should be export function fakeBackendFactory()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Shall I add commit this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).