aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/compile.js
AgeCommit message (Collapse)Author
2013-09-27docs(angular.Module): fix controller and directive method parametersDavid Bennett
2013-09-11docs(Attributes): add missing documentation for $observe methodButch Peters
- Add proper ngdoc annotations to existing $observe documentation - Add link to directive guide for usage example of $observe - Add note about $observe function parameter signature Closes #3957
2013-08-21revert: fix($compile): correct controller instantiation...Igor Minar
fix($compile): correct controller for async directives This reverts commit 51d32243fe8cfbdcd1b647950d4e99ed57677558 as well as commit 9c51d503188efae14b81bd4d6dd7d5a3363f050f Changing ordering of events in stable branch is not a good idea.
2013-08-20fix($compile): correct controller instantiation for async directivesChirayu Krishnappa
This fixes regression introduced by #3514 (9c51d503) - this commit is being reverted here and a better fix is included. The regression caused the controller to be instantiated before the isolate scope was initialized. Closes #3493 Closes #3482 Closes #3537 Closes #3540
2013-08-12fix($compile): don't check attr.specified on non-ie7Igor Minar
the specified attribute is depricated and creates warnings in Firefox Closes #3231 Closes #2160
2013-08-09docs($compile): update directive type signatureOpherV
To avoid "Argument type Array is not assignable to parameter type function" validation error When using the minifcation-safe array style (eg .directive('myDirective', ['$http','$timeout','$compile', function($http,$timeout $compile).... ) Closes #3392
2013-08-08fix($compile): always instantiate controllers before pre-link fns runjankuca
Controllers should be always instantiated after compile fn runs, but before pre-link fn runs. This way, controllers are available to pre-link fns that request them. Previously this was broken for async directives (directives with templateUrl). Closes #3493 Closes #3482 Closes #3514
2013-08-06docs(compile): fix minor spelling mistakeMichael Stewart
Closes: #3468
2013-07-04fix($compile): empty normalized href should pass sanitation checkAnders Hessellund Jensen
Sometimes IE returns an empty string for its normalized href on a tags. This should pass the sanitation check in $compile. Closes #2219, #2593
2013-05-21style(*): fix up semicolon and var usageAnatoly Shikolay
Conflicts: src/ng/animation.js src/ng/animator.js src/ng/http.js
2013-05-09style($compile): clarify argument nameIgor Minar
2013-04-11docs($compile): improve docsDavid Sanders
2013-02-25fix($compile): compile replace directives in external templatedanilsomsikov
Passing DOMNode#childNodes to compileNodes when compiling remote template, so that directives with replace:true can be compiled. The previous version used jqLite#contents which returned collection that was not updated during the compilation. Closes #1859
2013-02-25fix($compile): whitelist file:// in url sanitizationIgor Minar
2013-02-23fix($compile): handle elements with no childNodes propertyIgor Minar
see the test for more details
2013-02-20fix($compile): sanitize values bound to a[href]Igor Minar
2013-02-18fix(compile): should not leak memory when there are top level empty text nodesPete Bacon Darwin
The change to prevent <span> elements being wrapped around empty text nodes caused these empty text nodes to have scopes and controllers attached, through jqLite.data() calls, which led to memory leaks and errors in IE8. Now we exclude all but document nodes and elements from having jqLite.data() set both in the compiler and in ng-view. Fixes: #1968 and #1876
2013-02-07fix($compile): rename $compileNote to compileNodeEnrique Paredes
Directives was observing different instances of Attributes than the one that interpolation was registered with because we failed to realize that the compile node and link node were the same (one of them was a wrapper rather than raw node) Closes #1941
2013-01-30feat(Scope): expose transcluded and isolate scope info for batarangBrian Ford
test($compile): add test for exposing transclude and isolate scope info to batarang
2013-01-17feat($compile): support modifying the DOM structure in postlink fnMartin Probst
Support modifying the DOM structure in the post link function of a directive 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).
2013-01-17style($compile): fix indentationIgor Minar
2013-01-17fix($compile): do not wrap empty root text nodes in spansPete Bacon Darwin
Closes #1059
2013-01-14fix($compile): safely create transclude comment nodesIgor Minar
Closes #1740
2012-10-29fix($compile): don't look for class directives in empty stringIgor Minar
if className is undefined or empty string, don't bother looking for directives in there
2012-10-29fix($compile): compilation should not recurse into empty nodesIgor Minar
if a node doesn't have children then don't try to compile these non-existent children
2012-10-29style($compile): better fn names for debuggingIgor Minar
2012-10-29refactor($compile): simplify nodeLinkFnIgor Minar
2012-10-29fix($compile): prevent double attr interpolation w/ templateUrlIgor Minar
This fixes the issue that caused two attr interpolation observers to be registered for the same attribute as a result of isolate scope definition with attr (@) property for this attribute. Duplicate observers would then fight with each other updating the model. The issue occured only when this directive was used in a repeater because that's when we clone the template node which caused the two observers to point to two different sets of $attr instances. Closes #1166, #836
2012-09-22fix($compile): reference local in isolate scopeVojta Jina
This was really corner case: Watcher needs to return changed value, to notify that model might have changed and one more $digest cycle needs to be performed. The watcher, that takes care of reference binding into an isolate scope ("="), did not return changed value, if the change was from the isolate scope to the parent. If any other watcher returned change, it worked fine, as this change caused re-digest. Closes #1272
2012-09-11fix(*): name all anonymous watch functions in AngularShyam Seshadri
This will allow us to see function names in Batarang and debugger. Closes #1119
2012-08-30fix(jqLite): better support for xhtmlIgor Minar
it turns out that some stuff doesn't work in xhtml as it does in html. for example &nbsp; 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
2012-08-13fix($compile): denormalize directive templatesIgor Minar
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.
2012-08-13refactor($compile): code cleanupIgor Minar
2012-08-12docs($compileProvider): remove duplicate of .directive()Vojta Jina
2012-08-12docs: fix broken links to $compileProvider.directive()Vojta Jina
2012-06-12docs(*): simplify doc urlsIgor Minar
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
2012-06-08fix($compile): correctly merge class attr for replace directivesMax Martinsson
Merging of interpolated class attribute from directive template with replace:true works Closes #1006
2012-06-08feat($compile): simplify isolate scope bindingsMisko Hevery
Changed the isolate scope binding options to: - @attr - attribute binding (including interpolation) - =model - by-directional model binding - &expr - expression execution binding This change simplifies the terminology as well as number of choices available to the developer. It also supports local name aliasing from the parent. BREAKING CHANGE: isolate scope bindings definition has changed and the inject option for the directive controller injection was removed. To migrate the code follow the example below: Before: scope: { myAttr: 'attribute', myBind: 'bind', myExpression: 'expression', myEval: 'evaluate', myAccessor: 'accessor' } After: scope: { myAttr: '@', myBind: '@', myExpression: '&', // myEval - usually not useful, but in cases where the expression is assignable, you can use '=' myAccessor: '=' // in directive's template change myAccessor() to myAccessor } The removed `inject` wasn't generaly useful for directives so there should be no code using it.
2012-06-08refactor($compile): always call attr.$observeMisko Hevery
attr.$observe used to call function only if there was interpolation on that attribute. We now call the observation function all the time but we only save the reference to it if interpolation is present.
2012-06-08chore(jqLite): performance reorderingMisko Hevery
2012-06-02doc(ngdoc): clean up doc generation and add missing documentation linksMisko Hevery
2012-05-04fix($compile): have $observe return registration functionMisko Hevery
2012-05-04fix($compile): ignore ws when checking if template has single rootIgor Minar
Also add the same error checking for sync templates. Closes #910
2012-05-03style($compile): rename orig*Node to beforeTemplate*NodeIgor Minar
2012-05-03fix($compile): fix replaceWithIgor Minar
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.
2012-05-03style($compile): clean up the code and normalize fn namesIgor Minar
2012-05-03fix($compile): attach scope to the directive element when templateUrl and ↵Igor Minar
replace=true We forgot to reattach the scope to the replacement element. This affected only directives that had templateUrl and replace:true properties. Reported on the mailing list: https://groups.google.com/forum/?fromgroups#!topic/angular/zwjLr1msS2Y http://jsfiddle.net/lukebayes/g9Sh9/
2012-05-03chore($compile): remove obsolete <<CONTENT>> transclusionIgor Minar
This stuff was never documented and is an accidental leftover from the time when the compiler was rewritten. If any code depends on this, it should be rewritten to use ngTransclude directive intead.
2012-05-03fix($compile): prevent duplicate directive controller instantiationIgor Minar
Closes #876
2012-05-02style($compile): rename compiler.js to compile.jsIgor Minar