Pawel you rock man.. awesome solution. Saved me a lot of Pain :) .
Thanks,
Abhijeet
On Saturday, September 1, 2012 1:32:27 AM UTC+8, Pawel Kozlowski wrote:
>
> Hi Todd,
>
> AngularJS doesn't have any special mock for $routeParams, but since
> those params are just a map we don't really need a dedicated mock.
> What you can do is to just inject a plain old JS object into your
> controller, sth like this:
>
> ctrl = $controller('MyAppCtrl', {
> $scope: scope,
> $routeParams : routeParams
> });
>
> Here is the complete jsFiddle:
> http://jsfiddle.net/pkozlowski_opensource/rKS5E/5/
>
> Hope this helps,
> Pawel
>
> --
> Question? Send a fiddle
> (http://jsfiddle.net/pkozlowski_opensource/Q2NpJ/) or a plunk
> (http://plnkr.co/)
> Need help with jsFiddle? Check this:
> http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/
>
> Looking for UI widget library for AngularJS? Here you go:
> http://angular-ui.github.com/
>
--
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.