seriema / angular-apimock

Automatically route your API calls to static JSON files, for hiccup free front–end development.
johansson.jp/angular-apimock
MIT License
65 stars 8 forks source link

Refactor httpInterceptor adding $locate service and unit test. #3

Closed ceoaliongroo closed 10 years ago

ceoaliongroo commented 10 years ago

Related to the issue https://github.com/seriema/angular-apimock/issues/2

seriema commented 10 years ago

Nice! Thanks a bunch! There seems to be several changes at the same time.

Can we break it up in different PR? Let's start with the location thing. I have fixed a bug locally that occurs when the parameter is in a # URL, like Angular does when routing (/#/?apimock=true). It uses .hash instead of .search on location.

ceoaliongroo commented 10 years ago

@seriema Great could you create an issue for the PRs and give specific example.

I do not understand what is the problem with method $location.search().

Thanks

seriema commented 10 years ago

$location might work as you'd expect. But regular location I needed to check both .search and .hash to check for apimock flag. I'll push my code and you'll be able to see it.

I will create separate issues. Thanks for being so awesome with helping!

seriema commented 10 years ago

I have merged some of the code here so I could continue working with what I intended. I put in your name and referenced these issues so it's clear you contributed. :)