You weren't using the service properly.  An updated 
plunk: http://plnkr.co/edit/WIGdqk?p=preview
My advice is to get familiar with a debugging tool. Either chrome developer 
tools (preferred for me) or firebug if your a Firefox guy.  Use console 
statements to examine what values variables contain. Then step it up and 
use breakpoints and 'debugger;' statements to check out your code during 
execution.  

Gordon

On Tuesday, April 1, 2014 1:07:16 PM UTC-5, Ben Shukman wrote:
>
> Hello everyone,
>
> I am relatively new to angular, and am very confused about the inheritance 
> between controllers and services.
>
> I am trying to build a rudimentary parser that analyzes a command input 
> from a form.  My first step is to make a function called arrayComparison(), 
> which I outsourced to a service.  My program won't share the variables and 
> methods between the controller and service.  The documentation I have read 
> is very confusing on this subject.
>
> Also, there are probably many best practices that I could utilize.  I 
> would greatly appreciate any advice on fixing this code/writing better 
> angularjs.
>
> The code: http://plnkr.co/edit/lYIrudz1Wprc3tMhxmFO?p=preview
>
> Thank you!
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to