| Age | Commit message (Collapse) | Author |
|
Closes #4105
|
|
|
|
|
|
|
|
Match jQuery behavior when prepending array into empty element
|
|
When real jQuery is present, Angular monkey patch it to fire `$destroy` event.
This commit fixes two issues in the jQuery patch:
- passing a selector to the $.fn.remove method (only fire `$destroy` on the matched elements)
- using `$.fn.html` without parameters as a getter (do not fire `$destroy`)
|
|
Implement mouseenter/mouseleave event referring to
http://www.quirksmode.org/js/events_mouse.html#link8 and jQuery source
code(not dependent on jQuery).
The old implementation is wrong. When moving mouse from a parent element
into a child element, it would trigger mouseleave event, which should not.
And the old test about mouseenter/mouseleave is wrong too. It just
triggers mouseover and mouseout events, cannot describe the process of mouse
moving from one element to another element, which is important for
mouseenter/mouseleave.
Closes #2131, #1811
|
|
|
|
|
|
The jQuery implementation of children only returns child nodes of the given element that are elements themselves. The previous jqLite implementation was returning all nodes except those that are text nodes. Use jQLite.contents() to get all the child nodes.
The jQuery implementation of contents returns [] if the object has no child nodes. The previous jqLite implementation was returning undefined, causing a stack overflow in test/testabilityPatch.js when it tried to `cleanup()` a window object.
The testabilityPatch was incorrectly using children() rather than contents() inside cleanup() to iterate down through all the child nodes of the element to clean up.
|
|
next() is supposed to return the next sibling *element* so it
should ignore text nodes. To achieve this, nextElementSibling()
should be used instead of nextSibling().
|
|
selector => cssClasses
|
|
in jQuery 1.8.x the data() data structure is changed and events are
not accessible via data().events. Since all we need is to trigger
all event handlers, we can do so via triggerHandler() api instead of
mocking with the internal jQuery data structures.
This fix was originally proposed by PeteAppleton via PR #1512.
Closes #1512
|
|
we need triggerHandler() to become jQuery 1.8.x compatible.
this is not fully featured triggerHandler() implementation - it doesn't
bother creating new DOM events and passing them into the event handlers.
this is intentional, we don't need access to the native DOM event for our
own purposes and creating these event objects is really tricky.
|
|
it turns out that some stuff doesn't work in xhtml as it does in html.
for example can't be innerHTML-ed and auto-closing of elements
doesn't work.
the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.
I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.
Closes #1301
|
|
we now have two types of namespaces:
- true namespace: angular.* - used for all global apis
- virtual namespace: ng.*, ngMock.*, ... - used for all DI modules
the virual namespaces have services under the second namespace level (e.g. ng.)
and filters and directives prefixed with filter: and directive: respectively
(e.g. ng.filter:orderBy, ng.directive:ngRepeat)
this simplifies urls and makes them a lot shorter while still avoiding name collisions
|
|
|
|
JQuery does not catch exceptions either, and just
lets them pass. This allows the exception to be
shown in console.
|
|
|
|
Since angular attaches scope/injector/controller
into DOM it should clean up after itself. No need
to complain about memory leaks, since they can
only happened on detached DOM. Detached DOM would
only be in tests, since in production the DOM
would be attached to render tree and removal
would automatically clear memory.
|
|
the old implementation didn't reattach jquery/jqlite data which caused
things like to be lost
I tried various implementations but it appears that by reattaching the data
to the new node by copying the expando property is the most reliable of all.
|
|
... just like jquery does
|
|
|
|
|
|
|
|
|
|
|
|
For typical app that has ng-app directive on the html element, we now can do:
angular.element(document).injector() or .injector()
angular.element(document).scope() or .scope()
instead of:
angular.element(document.getElementsByTagName('html')[0]).injector()
...
|
|
In ie7 all of the input fields are set to readonly and disabled, because ie7 enumerates over all attributes even if the are not declared on the element.
|
|
Fixed an issue where a directive that uses transclusion (such as ngRepeat) failed to link if it was declared on the root element of the compilation tree. (For example ngView or ngInclude including template where ngRepeat was the top most element).
|
|
extend JQuery with .controller() method which retrieves the closest controller for a given element
|
|
- compiler would rewrite boolean attributes on all elements. This is too aggressive and interferes with some third-party frameworks
|
|
|
|
|
|
|
|
|
|
These methods cause IE8 holds the whole jqLite in the memory, even when page is reloaded.
jqLite's cache keeps element's data (event handlers, attached scopes, injector, etc…), so almost all used memory is never released in IE8.
jQuery creates its own Event object (wrapper around native Event) instead.
|
|
|
|
|
|
- turn everything into a directive
|
|
|
|
|
|
|
|
closure compiler is smarter than we expected and drops the unused fn
argument - this breaks the meta-programing logic of jqLite.
The fix special cases JQLiteHasClass since its the only fn that needs
this treatment in a way that is minification-proof.
|
|
BREAK:
- remove angular.[Object/Array/String/Function]
- in templates [].$filter(predicate) and friends need to change to [] | filter:predicate
|
|
|
|
|
|
|
|
|
|
|