-
Notifications
You must be signed in to change notification settings - Fork 0
/
stackoverflow.html
2118 lines (1910 loc) · 116 KB
/
stackoverflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Questions containing 'angular testing' - Stack Overflow</title>
<link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflow/img/favicon.ico">
<link rel="apple-touch-icon image_src" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cdn.sstatic.net/js/stub.js?v=1f945f8e69cb"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sstatic.net/stackoverflow/all.css?v=e6fa9089e607">
<link rel="alternate" type="application/atom+xml" title="Feed of recent questions" href="/feeds">
<style>
mark{ background-color: transparent;color: inherit;}
</style>
<script>
$(function () {
$('.advanced-tips-toggle').toggle(function () {
$('.advanced-tips').slideDown(100, function() {
$('.advanced-tips table').fadeTo(200, 1);
});
return false;
}, function () {
$('.advanced-tips table').fadeTo(200, 0, function () {
$('.advanced-tips').slideUp(100);
});
return false;
});
});
</script>
<script type="text/javascript">
StackExchange.init({"stackAuthUrl":"https://stackauth.com","serverTime":1366563829,"styleCode":true,"enableUserHovercards":true,"site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","useNewStyleFavoriteTagsEditor":true,"enableSocialMediaInSharePopup":true},"user":{"fkey":"e0e9c19c76e3128a59c6baa10e6f8165","isRegistered":true,"userId":456406,"accountId":206858,"gravatar":"<div class=\"\"><img src=\"http://www.gravatar.com/avatar/8fb40f1b5688816021431a316323ffd5?s=32&d=identicon&r=PG\" alt=\"\" width=\"32\" height=\"32\"></div>","profileUrl":"http://stackoverflow.com/users/456406/marco-alves","notificationsUnviewedCount":0,"inboxUnviewedCount":0}});
StackExchange.using.setCacheBreakers({"js/prettify-full.js":"6c261bebf56a","js/moderator.js":"f96f7e4ee5dc","js/full-anon.js":"4aa778f20142","js/full.js":"2cb347042411","js/wmd.js":"605c62dd1a01","js/third-party/jquery.autocomplete.min.js":"e5f01e97f7c3","js/mobile.js":"6eb68240242f","js/help.js":"fc9fb0517db2","js/tageditor.js":"450c9e8426fc","js/tageditornew.js":"b6c68ad4c7dd","js/inline-tag-editing.js":"8e84e8a137f7","js/revisions.js":"7273bb714bba","js/review.js":"5b2105439221","js/tagsuggestions.js":"aa48ef6154df","js/post-validation.js":"98fa812e7e1a","js/explore-qlist.js":"44794e78c6be"});
</script>
<script type="text/javascript">
StackExchange.using("gps", function() {
StackExchange.gps.init(true);
});
</script>
</head>
<body class="search-page">
<noscript><div id="noscript-padding"></div></noscript>
<div id="notify-container"></div>
<div id="overlay-header"></div>
<div id="custom-header"></div>
<div class="container">
<div id="header" >
<div id="portalLink">
<a class="genu" href="http://stackexchange.com" onclick="StackExchange.ready(function(){genuwine.click();});return false;">Stack Exchange</a>
</div>
<div id="topbar">
<div id="hlinks">
<span id="hlinks-user"> <span class="profile-triangle">▼</span><a href="/users/456406/marco-alves" class="profile-link">marco alves</a> <a href="/users/456406/marco-alves?tab=reputation"><span class="reputation-score" title="your reputation; view reputation changes" dir="ltr">40</span></a><span title="6 bronze badges"><span class="badge3"></span><span class="badgecount">6</span></span>
<span class="lsep">|</span>
</span>
<span id="hlinks-nav"></span>
<span id="hlinks-custom"> <a href="http://chat.stackoverflow.com">chat</a>
<span class="lsep">|</span>
<a href="http://meta.stackoverflow.com">meta</a>
<span class="lsep">|</span>
<a href="/about">about</a>
<span class="lsep">|</span>
<a href="/faq">faq</a>
</span>
</div>
<div id="hsearch">
<form id="search" action="/search" method="get" autocomplete="off">
<div>
<input autocomplete="off" name="q" class="textbox" placeholder="search" tabindex="1" type="text" maxlength="240" size="28" value="angular testing">
</div>
</form>
</div>
</div>
<br class="cbt">
<div id="hlogo">
<a href="/" >
Stack Overflow
</a>
</div>
<div id="hmenus">
<div class="nav mainnavs ">
<ul>
<li><a id="nav-questions" href="/questions">Questions</a></li>
<li><a id="nav-tags" href="/tags">Tags</a></li>
<li><a id="nav-users" href="/users">Users</a></li>
<li><a id="nav-badges" href="/badges">Badges</a></li>
<li><a id="nav-unanswered" href="/unanswered">Unanswered</a></li>
</ul>
</div>
<div class="nav askquestion">
<ul>
<li>
<a id="nav-askquestion" href="/questions/ask">Ask Question</a>
</li>
</ul>
</div>
</div>
</div>
<div id="content">
<div id="mainbar">
<div class="subheader search-header">
<h1>Search</h1>
</div>
<form id="bigsearch" action="/search" method="get">
<table>
<tr>
<td class="col1"><input name="q" class="textbox" type="text" maxlength="140" size="80" value="angular testing"></td>
<td class="col2"><input type="submit" value="search"/></td>
</tr>
</table>
</form>
<div class="subheader results-header">
<h2>
554 <span class="results-label">results</span>
</h2>
<div id="tabs">
<a class="youarehere" href="/search?tab=relevance&q=angular%20testing" title="Search results with best match to search terms">relevance</a>
<a href="/search?tab=newest&q=angular%20testing" title="Newest search results">newest</a>
<a href="/search?tab=votes&q=angular%20testing" title="Highest voted search results">votes</a>
<a href="/search?tab=active&q=angular%20testing" title="Recently active search results">active</a>
</div>
</div>
<div class="search-results">
<div class="question-summary search-result" id="question-summary-11758079">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>0</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/11758079/how-to-get-the-url-parameters-using-angular-js" title="How to get the url parameters using angular js">Q: How to get the url parameters using angular js</a></span>
</div>
<div class="excerpt">
('keyword')}}<br>
$location.hash() = {{$location.hash()}}<br>
keyword valus is={{loc}} and ={{loc1}}
</div>
</div>
<span class="result-highlight">Angular</span> js source code
function <span class="result-highlight">test</span>($scope, $location … ) {
$scope.$location = $location;
$scope.ur = $scope.$location.url('www.html.com/x.html?keyword=<span class="result-highlight">test</span>#/x/u');
$scope.loc1 = $scope.$location.search().keyword ;
if($location.url().indexOf …
</div>
<div class="tags user-tags t-angular">
<a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-08-01 11:17:27Z" class="relativetime">aug 1</span> by <a href="/users/1468231/praveen-d-souza">Praveen D souza</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-13165881">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13165881/awaiting-element-load-in-angulars-scenario-runner" title="Awaiting element load in Angular's scenario runner">Q: Awaiting element load in Angular's scenario runner</a></span>
</div>
<div class="excerpt">
I am using Angular's scenarios to do end to end <span class="result-highlight">testing</span> of my app. I would like to run <span class="result-highlight">tests</span> based on elements that take some time to load. I could just use a sleep() command, but I'd rather do …
</div>
<div class="tags user-tags t-angular">
<a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-10-31 19:07:13Z" class="relativetime">oct 31</span> by <a href="/users/147601/rosarch">Rosarch</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-7072626">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>2</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/7072626/how-to-test-angular-controller-with-jstestdriver" title="How to test angular controller with JsTestDriver?">Q: How to test angular controller with JsTestDriver?</a></span>
</div>
<div class="excerpt">
config:
server: http://localhost:9876
load:
- http://code.jquery.com/jquery-1.6.2.min.js
- http://code.angularjs.org/<span class="result-highlight">angular</span>-0.9.17.min.js
- web/*.js
- <span class="result-highlight">test</span>/*.js
When I run the <span class="result-highlight">test</span> … I have the following code:
function TestStats($xhr) {
$xhr(
'GET',
'/<span class="result-highlight">test</span>-dashboard/get-projects.json',
angular.bind(this, function(code, response …
</div>
<div class="tags user-tags t-js-test-driver t-angular">
<a href="/questions/tagged/js-test-driver" class="post-tag" title="show questions tagged 'js-test-driver'" rel="tag">js-test-driver</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2011-08-16 01:22:14Z" class="relativetime">aug 16 '11</span> by <a href="/users/807037/noel-yap">Noel Yap</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-12485217">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>2</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>2</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12485217/how-to-validate-when-a-checkbox-is-checked-in-angularjs-e2e-tests" title="How to validate when a checkbox is checked in AngularJS e2e tests?">Q: How to validate when a checkbox is checked in AngularJS e2e tests?</a></span>
</div>
<div class="excerpt">
I've been trying out the AngularJS e2e <span class="result-highlight">tests</span> and am getting stuck determining whether or not a checkbox is checked.
I used the end to end <span class="result-highlight">test</span> for the checkbox input as a sample (see the End to end … <span class="result-highlight">test</span> tab in the Example).
Html snippet:
Value1: <input type="checkbox" ng-model="value1"> <br/>
Controller snippet:
function Ctrl($scope) {
$scope.value1 = true;
}
Here is what I tried:
1 …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-09-18 21:20:47Z" class="relativetime">sep 18</span> by <a href="/users/1207991/gloopy">Gloopy</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-12488828">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
<div class="status answered">
<strong>2</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12488828/how-do-i-inject-dependencies-into-angularjs-controller-tests-without-using-jasmi" title="How do I inject dependencies into AngularJS controller tests without using Jasmine-specific inject()">Q: How do I inject dependencies into AngularJS controller tests without using Jasmine-specific …</a></span>
</div>
<div class="excerpt">
;
}
angular.module('Characters', ['ngResource'])
.factory('King', function() {
return "Mufasa";
});
I want to <span class="result-highlight">test</span> PrideRockCtrl. If I follow examples in the documentation and in the tutorial, I could use … ");
}));
});
This works fine, but this isn't a cross-<span class="result-highlight">test</span>-framework solution. The module() and inject() <span class="result-highlight">test</span> helpers are only compatible with Jasmine.
What's the best way to manually accomplish the same …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-09-19 04:58:54Z" class="relativetime">sep 19</span> by <a href="/users/456496/matt-york">Matt York</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-13358615">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes answered">
<span class="vote-count-post "><strong>2</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13358275/how-to-verify-that-an-http-request-is-not-made-at-all/13358615#13358615" title="How to verify that an http request is not made at all?">A: How to verify that an http request is not made at all?</a></span>
</div>
<div class="excerpt">
You can <span class="result-highlight">test</span> that no calls are made by using the verifyNoOutstandingRequest() method from the $httpBackend mock.
Usually those kind of verification is done in the afterEach section of a Jasmine's … <span class="result-highlight">tests</span>. On top of this it is common to call another method, verifyNoOutstandingExpectation() to verify that all the expected calls were actually invoked.
Here is the code, where you need to inject …
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-11-13 09:56:05Z" class="relativetime">nov 13</span> by <a href="/users/1418796/pkozlowski-opensource">pkozlowski.opensource</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-11784656">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>7</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/11784656/angularjs-location-not-changing-the-path" title="AngularJS $location not changing the path">Q: AngularJS $location not changing the path</a></span>
</div>
<div class="excerpt">
variables, directives are fired.
A special form directive is fired which performs a special form submission using AJAX.
After the AJAX is performed (<span class="result-highlight">Angular</span> doesn't take care of the AJAX … param to '/' as well ... Nope. I've also tried not submitting the form. Nothing works. Can someone help me out please?
I've <span class="result-highlight">tested</span> to see if the code reaches the onAfterSubmit function (which it does …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-08-02 19:42:55Z" class="relativetime">aug 2</span> by <a href="/users/340939/matsko">matsko</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-12062940">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>2</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12059956/angularjs-pre-served-params-variables-for-a-controller-defined-inside-of-a-rout/12062940#12062940" title="AngularJS Pre-served $params variables for a controller defined inside of a route">A: AngularJS Pre-served $params variables for a controller defined inside of a route</a></span>
</div>
<div class="excerpt">
AFAIK it is not currently possible to specify additional parameters for a route. Having said this your use case could be easily covered by <span class="result-highlight">testing</span> if :id is defined as part of $routeParams … .
The thing is that AngularJS will match your routes either on '/full/page' or '/full/page/with/:id' so just by <span class="result-highlight">testing</span> $routeParams for id presence in your controller:
if ($routeParams.id)
you would know in which case your are.
The alternative is to use different controllers for different routes.
…
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-08-21 20:57:38Z" class="relativetime">aug 21</span> by <a href="/users/1418796/pkozlowski-opensource">pkozlowski.opensource</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-13147435">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>2</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13147435/query-string-in-resource-url" title="query string in $resource url">Q: query string in $resource url</a></span>
</div>
<div class="excerpt">
is
/api/?p=item?<span class="result-highlight">test</span>=123
apparently there is a bug, but how to get around it?
EDIT: filed this at https://github.com/<span class="result-highlight">angular</span>/angular.js/issues/1511
… my service has to use a query string due to limitations on the server that runs classic ASP:
<span class="result-highlight">angular</span>
.module('myServices', ['ng', 'ngResource'])
.factory('Item', ['$resource',
function …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-10-30 20:54:21Z" class="relativetime">oct 30</span> by <a href="/users/410102/akonsu">akonsu</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-11787061">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes answered">
<span class="vote-count-post "><strong>8</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/11786764/track-to-see-when-a-view-changes-in-angularjs/11787061#11787061" title="Track to see when a view changes in angularjs">A: Track to see when a view changes in angularjs</a></span>
</div>
<div class="excerpt">
-type equals text/html similar to what this post shows with application/json.
Note: in my <span class="result-highlight">tests</span> it looks like the headersGetter()['Content-Type'] in the spinnerFunction is omitted when retrieving my .html files whereas it is populated when making service calls.
…
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-08-02 23:04:46Z" class="relativetime">aug 2</span> by <a href="/users/1207991/gloopy">Gloopy</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-12489833">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12488828/how-do-i-inject-dependencies-into-angularjs-controller-tests-without-using-jasmi/12489833#12489833" title="How do I inject dependencies into AngularJS controller tests without using Jasmine-specific inject()">A: How do I inject dependencies into AngularJS controller tests without using Jasmine-specific …</a></span>
</div>
<div class="excerpt">
");
}));
});
In fact you were pretty close with your attempts, the only thing missing was a local dependency in a controller (King:"Mufasa").
In the <span class="result-highlight">tests</span> like those, where we do focus on a one, selected …
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-09-19 06:54:23Z" class="relativetime">sep 19</span> by <a href="/users/1418796/pkozlowski-opensource">pkozlowski.opensource</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-12485803">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes answered">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12485217/how-to-validate-when-a-checkbox-is-checked-in-angularjs-e2e-tests/12485803#12485803" title="How to validate when a checkbox is checked in AngularJS e2e tests?">A: How to validate when a checkbox is checked in AngularJS e2e tests?</a></span>
</div>
<div class="excerpt">
I upvoted this question as I had the same issue.
I used following workaround in my <span class="result-highlight">test</span>, but I'm hoping to see the better way.
expect( element('input[ng-model="value1"]').attr('checked') ).toBeTruthy();
…
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-09-18 22:09:03Z" class="relativetime">sep 18</span> by <a href="/users/1238847/tosh-shimayama">tosh shimayama</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-13168920">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes answered">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13166319/create-an-unordered-list-n-levels-deep-using-angularjs/13168920#13168920" title="Create an unordered list n-levels deep using AngularJS">A: Create an unordered list n-levels deep using AngularJS</a></span>
</div>
<div class="excerpt">
|| [];
}
app.controller('MainCtrl', function($scope) {
$scope.items = [
new Item('<span class="result-highlight">test</span>'),
new Item('foo', [
new Item('foo-1'),
new Item('foo-2', [
new Item('foo-2 …
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-10-31 23:31:50Z" class="relativetime">oct 31</span> by <a href="/users/135786/blesh">blesh</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-12067151">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes answered">
<span class="vote-count-post "><strong>5</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12059956/angularjs-pre-served-params-variables-for-a-controller-defined-inside-of-a-rout/12067151#12067151" title="AngularJS Pre-served $params variables for a controller defined inside of a route">A: AngularJS Pre-served $params variables for a controller defined inside of a route</a></span>
</div>
<div class="excerpt">
No time to <span class="result-highlight">test</span> it now, but according to $routeProvider documentation, something like this should work:
function Ctrl($scope, isFiltered) {
if(isFiltered) {
//make sure that the ID …
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2012-08-22 06:04:26Z" class="relativetime">aug 22</span> by <a href="/users/453605/marcello-nuccio">Marcello Nuccio</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-11956667">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>4</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/11956667/angularjs-intercept-and-extend-controller-scope" title="AngularJS Intercept and extend controller $scope">Q: AngularJS Intercept and extend controller $scope</a></span>
</div>
<div class="excerpt">
, is there a way to extend the $scope variable so that I can have my extended code available everywhere?
Something like:
//I've <span class="result-highlight">tested</span> this out and it doesn't work, but this is what I want to do …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-08-14 16:24:53Z" class="relativetime">aug 14</span> by <a href="/users/340939/matsko">matsko</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-12574765">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12574765/better-design-for-passing-data-to-other-ng-views-in-angularjs-persisting-it-ac" title="Better design for passing data to other ng-view's in AngularJS. Persisting it across controllers">Q: Better design for passing data to other ng-view's in AngularJS. Persisting it across control…</a></span>
</div>
<div class="excerpt">
(data);
$location.url('/<span class="result-highlight">test</span>');
});
}
Then in the view that gets loaded for /<span class="result-highlight">test</span>
I am just calling
<div ng-controller="resultController">
<div class="blueitem">{{getResultForPeople …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-09-25 00:33:33Z" class="relativetime">sep 25</span> by <a href="/users/117691/faisal-abid">Faisal Abid</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-12259963">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12259963/how-do-i-get-a-directive-to-be-linked-in-dynamically-loaded-html-in-angularjs" title="How do I get a directive to be linked in dynamically loaded HTML in AngularJS? [closed]">Q: How do I get a directive to be linked in dynamically loaded HTML in AngularJS? [closed]</a></span>
</div>
<div class="excerpt">
.
I have a <span class="result-highlight">test</span>-case on jsFiddle. Do bring up your JS console to view the messages.
Note that console.log never shows the directive factory being called, let alone linked.
Am I doing something wrong?
…
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-09-04 08:55:15Z" class="relativetime">sep 4</span> by <a href="/users/1395668/andrew-alcock">Andrew Alcock</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-13358275">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>0</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13358275/how-to-verify-that-an-http-request-is-not-made-at-all" title="How to verify that an http request is not made at all?">Q: How to verify that an http request is not made at all?</a></span>
</div>
<div class="excerpt">
(pageNumber)).success(function (response) {
$scope.pageDetails = response;
}).error(function (response, errorCode) {
});
};
and this <span class="result-highlight">test</span> :
it("should not allow …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-11-13 09:31:14Z" class="relativetime">nov 13</span> by <a href="/users/1170677/adio">Adio</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-11923627">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
<div class="status answered-accepted">
<strong>2</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/11923627/angularjs-better-way-to-manage-partials-and-controller-data" title="AngularJS better way to manage partials and controller data">Q: AngularJS better way to manage partials and controller data</a></span>
</div>
<div class="excerpt">
it looks like (its works, but it's messy hard to <span class="result-highlight">test</span>):
angular.module('App', []).directive('someDirective',function() {
return {
link : function($scope, element, attrs) {
var onReady …
</div>
<div class="tags user-tags t-angularjs t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-08-12 16:05:38Z" class="relativetime">aug 12</span> by <a href="/users/340939/matsko">matsko</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-12260906">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>5</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>3</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/12260906/how-to-inject-dependencies-in-jasmine-test-for-a-angular-item" title="How to inject dependencies in jasmine test for a angular item">Q: How to inject dependencies in jasmine test for a angular item</a></span>
</div>
<div class="excerpt">
Here is the <span class="result-highlight">test</span> spec file:
describe('<span class="result-highlight">Test</span> main controller', function(){
it('Should initialize value to Loading', function(){
$scope = {}
ctrl = new … .$on('broadCastWkspNameEvent', function (e, args) {
$scope.wksp_name = args
})
}
mainNavController.$inject=['$scope']
But my <span class="result-highlight">test</span> fails saying Object #<Object> has no method '$on'
I am …
</div>
<div class="tags user-tags t-angularjs t-jasmine t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/jasmine" class="post-tag" title="show questions tagged 'jasmine'" rel="tag">jasmine</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-09-04 09:51:49Z" class="relativetime">sep 4</span> by <a href="/users/1278480/ranjith-r">Ranjith R</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="answer-id-14341628">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13414049/angularjs-modal-window-directive/14341628#14341628" title="AngularJS modal window directive">A: AngularJS modal window directive</a></span>
</div>
<div class="excerpt">
plunker demo illustrating essentially what I'm using in my app: http://embed.plnkr.co/iqVl0Wb57rmKymza7AlI/preview
Bonus, it's got some <span class="result-highlight">tests</span> to ensure two password fields match (or highlights them …
</div>
<div class="tags user-tags t-angularjs t-angular">
</div>
<div class="started fr">
answered <span title="2013-01-15 15:58:10Z" class="relativetime">jan 15</span> by <a href="/users/1972101/will-vincent">Will Vincent</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-13039728">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>1</strong></span>
<div class="viewcount">vote</div>
</div>
</div>
<div class="status answered-accepted">
<strong>2</strong>answers
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/13039728/angularjs-testing-error-unknown-provider-httpbackend-provider-httpbacke" title="AngularJS testing error: Unknown provider: $_httpBackend_Provider <- $_httpBackend_">Q: AngularJS testing error: Unknown provider: $_httpBackend_Provider <- $_httpBackend_</a></span>
</div>
<div class="excerpt">
a trivial <span class="result-highlight">test</span>', function() {
expect(true).toBe(true);
});
});
I inserted the expect(true).toBe(true) just to get the <span class="result-highlight">test</span> to execute and fail, even though it does not touch the <span class="result-highlight">angular</span> … I am attempting to <span class="result-highlight">test</span> an AngularJS controller with a Jasmine unit <span class="result-highlight">test</span> spec file. My approach is to use $httpBacked, in the following <span class="result-highlight">test</span>:
describe('SubmissionsController', function() {
var …
</div>
<div class="tags user-tags t-angularjs t-jasmine t-angular">
<a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> <a href="/questions/tagged/jasmine" class="post-tag" title="show questions tagged 'jasmine'" rel="tag">jasmine</a> <a href="/questions/tagged/angular" class="post-tag" title="show questions tagged 'angular'" rel="tag">angular</a> </div>
<div class="started fr">
asked <span title="2012-10-23 21:39:19Z" class="relativetime">oct 23</span> by <a href="/users/1753619/oxirane">oxirane</a>
</div>
</div>
</div>
<div class="question-summary search-result" id="question-summary-10774772">
<div class="statscontainer">
<div class="statsarrow"></div>
<div class="stats">
<div class="vote">
<div class="votes ">
<span class="vote-count-post "><strong>3</strong></span>
<div class="viewcount">votes</div>
</div>
</div>
<div class="status answered-accepted">
<strong>1</strong>answer
</div>
</div>
</div>
<div class="summary">
<div class="result-link">
<span><a href="/questions/10774772/angular-basic-testing-with-injection" title="Angular: basic testing with injection">Q: Angular: basic testing with injection</a></span>
</div>
<div class="excerpt">
.  I'm using testacular + Jasmine, with browserify to compile things.  I was having no problems until I started trying to do a lot <span class="result-highlight">angular</span>-injection-stuff.
Right now I'm simply trying to do a <span class="result-highlight">test</span> of ng … So I'm new to the whole <span class="result-highlight">testing</span> thing (I've been one of those people who has said 'I should write unit <span class="result-highlight">tests</span>...' but never ended up ever doing it :-p).
I'm now writing unit <span class="result-highlight">tests</span> for this project …
</div>
<div class="tags user-tags t-unit-testing t-testing t-angularjs">
<a href="/questions/tagged/unit-testing" class="post-tag" title="show questions tagged 'unit-testing'" rel="tag">unit-testing</a> <a href="/questions/tagged/testing" class="post-tag" title="show questions tagged 'testing'" rel="tag">testing</a> <a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged 'angularjs'" rel="tag">angularjs</a> </div>
<div class="started fr">
asked <span title="2012-05-27 14:39:11Z" class="relativetime">may 27</span> by <a href="/users/1397051/andy-joslin">Andy Joslin</a>
</div>
</div>
</div>