aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2013-10-24docs(ngBindHtml): add exampleNicolas Brugneaux
Closes #4427
2013-10-24fix($compile): instantiate controlers when re-entering compilationIgor Minar
When we re-enter compilation either due to async directive templates or element transclude directive we need to keep track of controllers to instantiate during linking. This piece of info was missing when re-entering compilation and that's what this commit fixes. I also reordered the properties in the previousCompileContext object. Closes #4434 Closes #4616
2013-10-24docs(ngNonBindable): fix punctuationDave Peticolas
Closes #4424
2013-10-24docs($provide): Fix typoPete Bacon Darwin
Closes #4420
2013-10-24docs(ngController): do not attach a controller twiceTyler McGinnis
A common mistake for beginners is to attach a controller in both the $routeProvider and also in the html document using the ng-controller directive. This change highlights this, to help prevent developers from doing so in the future. Closes #4409
2013-10-24fix(input): keep track of min/max attars on-the-flyDmitry Shirokov
Now input[type=button] keeps track of both min and max attrs even if they change over time.
2013-10-23chore(docs): fix jsHint errors with long linesMatias Niemelä
2013-10-23docs(guide/directive,guide/compiler,): drastically improveBrian Ford
2013-10-23chore(ngMocks): shorten the length of the description line to avoid jsHint ↵Matias Niemelä
errors
2013-10-23feat(docs): provide index pages for each angular moduleMatias Niemelä
2013-10-23fix(ngView): ensure the new view element is placed after the old view elementMatias Niemelä
Closes #4362
2013-10-23fix($animate): ensure animations work properly when the $rootElement is ↵Matias Niemelä
being animated Closes #4397 Closes #4231
2013-10-23fix($animate): only cancel class-based animations if the follow-up class ↵Matias Niemelä
contains CSS transition/keyframe animation code Closes #4463 Closes #3784
2013-10-22style: make jshint happyVojta Jina
2013-10-22chore(grunt): add jshint tasksPete Bacon Darwin
2013-10-22fix: don't inline css in csp mode.tigbro
Also add `angular-csp.css` to the resulting build.
2013-10-22fix(ngAnimate): fix cancelChildAnimations throwing exceptionGrzegorz Lachowski
fix ngAnimate throwing exception in cancelChildAnimations on deletion of element (ngAnimate's leave decorator) of repeated element when using ng-include on this element. Closes #4548
2013-10-21docs(ngCsp): pretty-format docsIgor Minar
2013-10-18fix(csp): fix csp auto-detection and stylesheet injectionIgor Minar
When we refactored , we broke the csp mode because the previous implementation relied on the fact that it was ok to lazy initialize the .csp property, this is not the case any more. Besides, we need to know about csp mode during bootstrap and avoid injecting the stylesheet when csp is active, so I refactored the code to fix both issues. PR #4411 will follow up on this commit and add more improvements. Closes #917 Closes #2963 Closes #4394 Closes #4444 BREAKING CHANGE: triggering ngCsp directive via `ng:csp` attribute is not supported any more. Please use data-ng-csp instead.
2013-10-18docs: correct broken linksVojta Jina
This also contains some whitespace corrections by my editor.
2013-10-18fix($injector): allow a constructor function to return a functionVojta Jina
This change makes `$injector.instantiate` (and thus `$provide.service`) to behave the same as native `new` operator.
2013-10-15docs($rootScope): better document infinite digest and ttlIgor Minar
2013-10-15fix($parse): check function call context to be safeChirayu Krishnappa
Closes #4417
2013-10-14docs: add missing priority documentation for structural directivesIgor Minar
2013-10-14docs(ngInit): fix typoTyler McGinnis
Closes #4384
2013-10-14docs(ngNonBindable): improve descriptionPete Bacon Darwin
Closes #4391
2013-10-14docs(booleanAttrs): improve grammar and clarityDave Peticolas
Closes #4392
2013-10-12fix($animate): ensure that a timeStamp is created if not provided by the ↵Matias Niemelä
browser event Firefox and (sometimes) Opera may not provide a timeStamp value in their event when passed to the event handler. This may cause animations not to close properly. This fix will automatically create a timeStamp value for the event in this situation when missing. Closes #3053
2013-10-11fix($compile): abort compilation when duplicate element transclusionIgor Minar
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See #4357. Closes #3893 Closes #4217 Closes #3307
2013-10-11fix(directives): correct priority of structural directivesIgor Minar
BREAKING CHANGE: the priority of ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView has changed. This could affect directives that explicitly specify their priority. In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView work together in all common scenarios their directives are being adjusted to achieve the following precendence: Directive | Old Priority | New Priority ============================================= ngRepeat | 1000 | 1000 --------------------------------------------- ngSwitchWhen | 500 | 800 --------------------------------------------- ngIf | 1000 | 600 --------------------------------------------- ngInclude/ngView | 1000 | 400
2013-10-11fix($compile): make order directives w/ same priority deterministicIgor Minar
Array.prototype.sort is speced out to be as potentionally unstable sort, which is how it's implemented in FF and IE. This has caused the order of directives with the same priority to vary between browsers. For consistency sake, we now consider directive name and registration, order when determining the order of directives with the same priority. Note: it is still possible to get into a situation when the directive order is underministic - when source files are loaded asynchronously in non-deterministic order and there are are directives registered with the same name and priority, the order in which they will be applied will depend on the file load order.
2013-10-11style: strip white space from filesIgor Minar
2013-10-11chore($compile): remove dead codeIgor Minar
2013-10-11docs(ngAnimate): fix typosHack Reactor Students
Closes #4375
2013-10-11docs(ngAnimate): fix link to ngClass pageSaul Maddox
Link was set to ngShow and it should be set to ngClass.
2013-10-10fix($animate): perform internal caching on getComputedStyle to boost the ↵Matias Niemelä
performance of CSS3 transitions/animations Closes #4011 Closes #4124
2013-10-10fix($animate): ensure structural animations skip all child animations even ↵Matias Niemelä
if no animation is present during compile Closes #3215
2013-10-10refactor($animate): queue all successive animations to use only one reflowMatias Niemelä
2013-10-10fix($animate): cancel any ongoing child animations during move and leave ↵Matias Niemelä
animations
2013-10-10fix($animate): ensure elapsedTime always considers delay valuesMatias Niemelä
2013-10-10refactor($animate): avoid checking for transition/animation support during ↵Matias Niemelä
each animation
2013-10-10docs(ngInit): add note on best practicesBrian Ford
2013-10-10fix(modules): stop leaking global variables in testsPete Bacon Darwin
The routeUtils.js file was declaring a number of functions that were leaking into other modules such as ngMocks causing tests to pass incorrectly. Closes #4360
2013-10-10refactor(location): $location now uses urlUtils, not RegExJeff Cross
The location service, and other portions of the application, were relying on a complicated regular expression to get parts of a URL. But there is already a private urlUtils provider, which relies on HTMLAnchorElement to provide this information, and is suitable for most cases. In order to make urlUtils more accessible in the absence of DI, its methods were converted to standalone functions available globally. The urlUtils.resolve method was renamed urlResolve, and was refactored to only take 1 argument, url, and not the 2nd "parse" boolean. The method now always returns a parsed url. All places in code which previously wanted a string instead of a parsed url can now get the value from the href property of the returned object. Tests were also added to ensure IPv6 addresses were handled correctly. Closes #3533 Closes #2950 Closes #3249
2013-10-10docs($provide): improve docs and examples furtherPete Bacon Darwin
Improve the "tracking" service example by adding a configuration option. Get better formatting of the generated code samples using <pre> tags. Move the detailed explanations into each function's documentation block. Improve the overview and list the constituent functions by significance. Closes #4302
2013-10-10docs($provide): improve examples and explanationsTim Ruffles
$provide's example seems awkward. Replace with more real-world example, using an injected service, where the service defined has a good reason to be a singleton. There's quite a lot of confusion around $provide: http://stackoverflow.com/search?q=angularjs+service+vs+factory Tests for example at: http://jsbin.com/EMabAv/1/edit?js,output
2013-10-09feat(ngRepeat): use block separator commentsjankuca
Issue: multi-elements ng-repeat (ng-repeat-start, ng-repeat-end) can contain elements with a trancluding directive. This directive changes content of the row (template) and ng-repeat does not work correctly (when removing/moving rows), because ng-repeat works with the original template (elements). This changes ng-repeat behavior to traverse the DOM to find current elements everytime we are moving/removing rows (if the template has multiple elements). Closes #3104
2013-10-09fix(jqLite): ignore class methods on comment elementsVojta Jina
Since c785267e jqLite uses setAttribute (rather than className property) in order to change classes. Some elements (eg. Comment) do not have this method which blows up. jQuery silently ignores these method calls (because it uses className), so to get the same behavior as jQuery, we check for setAttribute method first.
2013-10-09revert: fix($parse): handle promises returned from parsed function callsIgor Minar
This reverts commit 3a65822023119b71deab5e298c7ef2de204caa13. The change cased regressions in third party components that require promises from getter functions not to be unwrapped. Since we have deprecated the promise unwrapping support in $parse it doesn't make much sense to fix this issue and deal with regressions in third party code. Closes #4158
2013-10-09fix($parse): deprecate promise unwrapping and make it an opt-inIgor Minar
This commit disables promise unwrapping and adds $parseProvider.unwrapPromises() getter/setter api that allows developers to turn the feature back on if needed. Promise unwrapping support will be removed from Angular in the future and this setting only allows for enabling it during transitional period. If the unwrapping is enabled, Angular will log a warning about each expression that unwraps a promise (to reduce the noise, each expression is logged only onces). To disable this logging use `$parseProvider.logPromiseWarnings(false)`. Previously promises found anywhere in the expression during expression evaluation would evaluate to undefined while unresolved and to the fulfillment value if fulfilled. This is a feature that didn't prove to be wildly useful or popular, primarily because of the dichotomy between data access in templates (accessed as raw values) and controller code (accessed as promises). In most code we ended up resolving promises manually in controllers or automatically via routing and unifying the model access in this way. Other downsides of automatic promise unwrapping: - when building components it's often desirable to receive the raw promises - adds complexity and slows down expression evaluation - makes expression code pre-generation unattractive due to the amount of code that needs to be generated - makes IDE auto-completion and tool support hard - adds too much magic BREAKING CHANGE: $parse and templates in general will no longer automatically unwrap promises. This feature has been deprecated and if absolutely needed, it can be reenabled during transitional period via `$parseProvider.unwrapPromises(true)` api. Closes #4158 Closes #4270