The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Using ngMockE2E to mock backend data

Using ngMockE2E to mock backend data

4:02
Mocking backend responses is extremely simple with angular-mocks.js and the ngMockE2E module. This lesson will show you how to include and use the module, ensuring you can stay productive on the front end even if your back end is broken, slow, or doesn't even exist yet.
Watch this lesson now
Avatar
egghead.io

Mocking backend responses is extremely simple with angular-mocks.js and the ngMockE2E module. This lesson will show you how to include and use the module, ensuring you can stay productive on the front end even if your back end is broken, slow, or doesn't even exist yet.

Avatar
Quintin West

From what I can tell it doesn't work in Ng 1.3.x; Not sure though, please advise.

In reply to egghead.io
Avatar
Ben

The JSBin example is using 1.3.15

In reply to Quintin West
Avatar
Joseph

Do you know how to mock in Protractor without needing to modify the app's source?

Avatar
Ben

Hey Joseph,

I guess you could check the URL and/or port the app is running on, and conditionally define the mocks if it matches your test environment.

HTH,
Ben

In reply to Joseph
Avatar
Victor Alfonso Hazbun Anuff

Why you don't create a video of how to use protractor and ngMockE2E?

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?