aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
AgeCommit message (Collapse)Author
2011-07-26fix(ng:show/ng:hide): use jqLite.show/jqLite.hideDi Peng
The previous implementation didn't handle situation when in css something was hidden with a cascaded display:none rule and then we wanted to show it. Unfortunatelly our test doesn't test this scenario because it's too complicated. :-/
2011-07-26style(warnings): prevent the browser from making bogus GET requests during testsMisko Hevery
2011-07-19Revert "fix(ng:class): preserve classes added post compilation"Igor Minar
This reverts commit 2428907259fa80ec3b1b4bfd85ea20028a9f4fa5. We decided to revert this because it is not bullet proof. The issue is that we can't reliably have both angular and non-angular code in charge of the DOM. We could work around some issues here and there, but we can't do it reliably, so it's better not to support DOM manipulation that happens outside of angular. There is a good chance that once we integrate with MDVs our possition will change, but until then our position is that only angular or angular widgets/directives can change change DOM that was compiled.
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-07-13fix(ng:class): preserve classes added post compilationDi Peng
- make sure ng:class preserve classes added after compilation Closes #355
2011-06-27test:ng#class: added a better unit test for ng:classDi Peng
2011-06-02Fix CSS tests on OperaVojta Jina
Opera translates name colors to numbers (red -> #ff0000) Other browsers like FF or Chrome translate number to rgb (#ff0000 -> rgb(255, 0, 0) So avoiding colors in tests is probably the easiest solution...
2011-03-01linking function should return bound scopeIgor Minar
angular.compile()() returns {scope:scope, view:view}, this isn't useful at all and only makes tests more verbose. Instead, this change makes the linking function return scope directly and if anyone needs the linked dom there are two ways to do it documented in angular.compile. other changes: - moved angular.compile docs to the compiler so that they are closer to the compiler - fixed some typos and updated angular.compile docs with the new return value
2011-02-18Remove ng:watchMisko Hevery
Closes#143
2011-02-16Change API angular.compile(element)([scope], [element/true])Misko Hevery
2011-02-16remove $init on scope from applying compilation templateMisko Hevery
Closes #40
2011-01-20null and other falsy values should not be rendered in the viewIgor Minar
Closes #242
2011-01-14fixed select with ng:formatMisko Hevery
select (one/multiple) could not chose from a list of objects, since DOM requires string ids. Solved by adding index formatter, which exposed incorrect handling of formatters in select widgets.
2010-12-02Closes #170. Corrected the behavior of select when options are ng:repeatedMisko Hevery
- Delete $postEval method, as it was a hack
2010-11-18move attribute widgets to widgets.js fileIgor Minar
- move @ng:repeat to widgets.js and its specs to widgetsSpecs.js - move @ng:non-bindable to widgets.js and its specs to widgetsSpecs.js - make widget.template suitable for attribute widgets - fix up the js docs for attribute widgets
2010-11-16Changed error handling so that better stack traces are displayed in the ↵Misko Hevery
ng-errors
2010-11-10Make ng:repeat expose $position.Igor Minar
- $position is a textual representation of the position of repeated item ('first', 'middle', 'last') - added specs for $index
2010-11-10added ng:switch-when-default; changed $watch to always fire on init. (may be ↵Misko Hevery
backward incompatible)
2010-10-27Fix failing tests for ie, and mark elements as ng-widget, ng-directive, and ↵Misko Hevery
ng-binding
2010-10-26fixes IE related failures, and form submit event handling in ieMisko Hevery
2010-10-26create HTML sanitizer to allow inclusion of untrusted HTML in safe manner.Misko Hevery
Sanitization works in two phases: 1) We parse the HTML into sax-like events (start, end, chars). HTML parsing is very complex, and so it may very well be that what most browser consider valid HTML may not pares properly here, but we do best effort. We treat this parser as untrusted. 2) We have safe sanitizeWriter which treats its input (start, end, chars) as untrusted content and escapes everything. It only allows elements in the whitelist and only allows attributes which are whitelisted. Any attribute value must not start with 'javascript:'. This check is performed after escaping for entity (&xAB; etc..) and ignoring any whitespace. - Correct linky filter to use safeHtmlWriter - Correct html filter to use safeHtmlWriter Close #33; Close #34
2010-10-23adding ng:submit directive for use with formsIgor Minar
- allows for binding angular expressions to onsubmit events - prevent default submit action (page reload)
2010-10-23simplifying ng:click specIgor Minar
2010-10-19fixed testsMisko Hevery
2010-10-13fixed issue where ng:bind would not reset value if expression returned undefinedMisko Hevery
2010-10-12Introduced injector and $new to scope, and injection into link methods and ↵Misko Hevery
controllers - added angular.injector(scope, services, instanceCache) which returns inject - inject method can return, instance, or call function which have $inject property - initialize services with $creation=[eager|eager-publish] this means that only some of the services are now globally accessible - upgraded $become on scope to use injector hence respect the $inject property for injection - $become should not be run multiple times and will most likely be removed in future version - added $new on scope to create a child scope - $inject is respected on constructor function - simplified scopes so that they no longer have separate __proto__ for parent, api, behavior and instance this should speed up execution since scope will now create one __proto__ chain per scope (not three). BACKWARD COMPATIBILITY WARNING: - services now need to have $inject instead of inject property for proper injection this breaks backward compatibility - not all services are now published into root scope (only: $location, $cookie, $window) - if you have widget/directive which uses services on scope (such as this.$xhr), you will now have to inject that service in (as it is not published on the root scope anymore)
2010-10-08change ng:controller to create new scope hence allow nestingMisko Hevery
2010-10-04fixed lint warningsIgor Minar
2010-10-01'A' tag widget and ng:click propagation changeIgor Minar
* added a widget for A (anchor) tag, that modifies the default behavior and prevent default action (location change and page reload) for tags with empty href attribute * stopped event propagation for all ng:click handlers
2010-08-14merge kai/masterMisko Hevery
2010-07-27fix preventDefault for eventsMisko Hevery
2010-07-22fix howers which were accidently brokenMisko Hevery
2010-07-15fixed buildMisko Hevery
2010-07-15proper handlig of $element in filtersMisko Hevery
2010-07-15proper handlig of $element in filtersMisko Hevery
2010-07-14appease IE on CSS stylesMisko Hevery
2010-07-14ng:style remembers previous style and properly resets to itMisko Hevery
2010-07-15fix undefine styleKai Compagner
2010-07-14fix undefine styleKai Compagner
2010-07-09ng:repeat ignores prototype keysMisko Hevery
2010-07-02change all attributes from ng- to ng: prefixMisko Hevery
2010-05-07change everything over to jasmineMisko Hevery
2010-04-22clean up failing test with jqueryMisko Hevery
2010-04-21ie6 now passesMisko Hevery
2010-04-21more if tests passMisko Hevery
2010-04-20fixes to enable ieMisko Hevery
2010-04-16lots of small fixesMisko Hevery
2010-04-12added ng-eval-order attributeMisko Hevery
2010-04-12removed Meta and allowed binding of HTMLMisko Hevery
2010-04-08tests pass jstd has issuesMisko Hevery