That worked, thanks! So is this acceptable as a best practice or is there
a better way to do this?
James
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I'm new to angular 1x and I have some complicated display business logic
using multiple and nested ng-if statements that I had put into my web page,
just to get it working. It didn't pass the code review and the suggested
refactoring was to call a service to handle this. I created the
I recently had a requirement to create a custom component that would make a
REST call to an API and then return data (a token) back. I'm working with
Angularjs 1.4.2.
So I created a custom directive that called a service to do this, however,
I kept failing to return the data back to the
Well I totally missed that! Yes I knew a little about promises, but didn't
see where having two return statements fit in. In my code I'm returning
the $http.post, (return $http) which it seems to be the promise object
itself, and returning the response which contains the data in .the .then
This is more involved than I first thought. Here is an overview of what
I'm trying to accomplish.
My original call to a restful login API returns a token, then I dynamically
create a return url from another service function and then I need to
redirect to an external URL outside of the
I'm using Angularjs 1.4.2 and I need to redirect to another URL after
$http.post success callback. I know I can use something like:
$window.location.href = "http://google.com;, but in this case
I think need to call a function in the service from the custom directive to
get the URL dynamically.
Okay, well it seemed different to me, but it is in the requirement.
Thank you,
James
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I have a custom directive that uses a modal dialog ($mdDialog) with a
submit button to call some services. All of the code is working, but when
it gets minified I get the "Unknown provider: aProvider <- a " error
message. After trying to find where this could be in the code, I realized
that