Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Support modifying the DOM structure in link function of a directive #1787

Closed
wants to merge 183 commits into from

Conversation

mprobst
Copy link
Contributor

@mprobst mprobst commented Jan 10, 2013

See #1773

IgorMinar and others added 30 commits July 19, 2012 21:48
Better than special-casing '$injector' in createInjector.
Copy fontawesome during build
scenario test for this example would be tricky, we need to teach
the runner how to inject mocks first.
the original test relied on incorrect assumptions about how jasmine async
tests work (when setTimeout is triggered) and how browser reloads a page
(the sequence of events) and thus the test passes even when the default
is not prevented.

this change fixes the test by registering an extra submit event handler
that checks if the default was prevented.

if the default was not prevented, the test will fail and the page will
be reloaded causing the test runner to panic.
this fix ensures that we prevent the default action on form submission
(full page reload) even in cases when the form is being destroyed as
a result of the submit event handler (e.g. when route change is
triggered).

The fix is more complicated than I'd like it to be mainly because
we need to ensure that we don't create circular references between
js closures and dom elements via DOM event handlers that would then
result in a memory leak.

Also the differences between IE8, IE9 and normal browsers make testing
this ugly.

Closes angular#1238
Added args in $on() listener syntax declaration
Chrome Canary now has CSP with apis that allow auto-detection. This change
will turn on CSP mode automatically when we detect its presence.

https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-interfaces--experimental
previously we expected to find option elements only within select element and if
that was not the case we throw an error. This made it impossible to include datalist
element with nested option elements in the template.

Closes angular#1165
previously the startSymbol() and endSymbol() getters were exposed only via provider
in the config phase
Since developers are allowed to customize start/end interpolation
strings, but third-party directive creators don't know about these
customizations, we should standardize on {{ }} in templates of
reusable (third-party) directives. During the compilation, these
templates are then denormalized to use whatever the custom
start/end symbol is, effectively translating the template into the
syntax of the runtime environment.

This addresses an issue raised at http://goo.gl/e8VPV

Existing code should not be affected by this change since project
that do use custom interpolation markers are not expected to use
{{ }} in existing directive templates.
shyamseshadri and others added 26 commits October 31, 2012 12:54
Add option to edit source in Angular Docs in Plunkr in addition to JsFiddle
previously examples like $http where broken because we would strip part of the
filename (http-hello.html -> http)

we really want to strip only the id suffix that we append to disambiguate
common filenames (like index.html) which appear in many examples.
Prefixed attributes like data-ng-model and x-ng-model were not being
found by the Selector. It was only looking at ng: and ng- prefixed
attributes.
Added a few tests as well to ensure the aforementioned prefixed
attributes are being matched properly.

Closes angular#1020
fixed example app, `simpleAppModule` should have been `myAppModule`.
Fix table formatting so headings are bold, rows are separated by lines, and rows have :hover style
Bug caused by the use of the `||` operator to replace all non-truthy
values with an empty string. Changed to replace only `undefined` values.

Closes angular#1401
Making testacular a dependency to avoid having to install it globally.
(Causes npm issues on some machines)
The cancel function accepts a Promise, but the timeout function
fails to specify returning a Promise.
Under certain circumstances chrome fails to GC scopes
because of buggy optimizations and caching. Nulling out
references to (not from!) other scopes helps Chrome to
realize that this object should be GC-ed.

This is really just a workaround as the real problem needs
to be fixed in Chrome.

See discusstion at:
angular#1313 (comment)

And chrome bug at:
https://code.google.com/p/v8/issues/detail?id=2073

Closes angular#1313
window.SecurityPolicy.isActive() is now window.securityPolicy.isActive

since this is available only in Chrome Canary which has already been
updated, we can safely make this change without worrying about
backwards compatilibty.

Closes angular#1577
…rective by creating a defensive copy of the node list, as opposed to a live DOM list.

This is useful for directives to actually replace their entire DOM fragment, e.g. with the HTML fragment generated by a 3rd party component (Closure, Bootstrap ...).
Fix the indentation of the compileNodes function (was one too little).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.