This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Support modifying the DOM structure in link function of a directive #1787
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
I also added missing tests.
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.
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)
docs(directive): fix typo
Per http://www.ietf.org/rfc/rfc3966.txt support tel: links
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #1773