aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
AgeCommit message (Collapse)Author
2012-03-08chore(directives,widgets): reorg the code under directive/ dirIgor Minar
2012-03-08fix(ng-cloak): work with classMisko Hevery
2012-03-08docs(directive, module): add various missing docs and fix existing docsIgor Minar
2012-03-08chore(compiler): change default restriction to attribute only for directivesMisko Hevery
2012-02-28feat(ng:include) Fire $contentLoaded eventVojta Jina
+ refactor unload to listen on this event -> we can use unload with ng:view as well Closes #743
2012-02-28feat(directive.style): Do not compile content of style elementVojta Jina
2012-02-23feta(scope): watch object refference or equalityMisko Hevery
Breaks: Must set $watch equality to true for the old behavior
2012-02-22docs(scope): show which directives create scopesMisko Hevery
2012-02-21refactor(directive): use attrs.$observeMisko Hevery
2012-02-21feat($compile) add locals, isolate scope, transclusionMisko Hevery
2012-02-21feat(directive): event now accessible as $eventMisko Hevery
Closes 259
2012-02-21fix(doc): example was referring to non existent CSSMisko Hevery
2012-01-25docs(compiler): update the compiler docsMisko Hevery
2012-01-25refactor(directives): connect new compilerMisko Hevery
- turn everything into a directive
2012-01-24feat(ng:class): support using map of classnames and conditionsKai Groner
enables <div ng:class="{'hide': !visible, 'warning': isAlert()}"...
2012-01-23refactor($controller): Add $controller service for instantiating controllersVojta Jina
So that we can allow user to override this service and use BC hack: https://gist.github.com/1649788
2012-01-23refactor(scope.$watch): rearrange arguments passed into watcher (newValue, ↵Vojta Jina
oldValue, scope) As scopes are injected into controllers now, you have the reference anyway, so having scope as first argument makes no sense… Breaks $watcher gets arguments in different order (newValue, oldValue, scope)
2012-01-23refactor(scope): separate controller from scopeVojta Jina
Controller is standalone object, created using "new" operator, not messed up with scope anymore. Instead, related scope is injected as $scope. See design proposal: https://docs.google.com/document/pub?id=1SsgVj17ec6tnZEX3ugsvg0rVVR11wTso5Md-RdEmC0k Closes #321 Closes #425 Breaks controller methods are not exported to scope automatically Breaks Scope#$new() does not take controller as argument anymore
2012-01-17docs(*): various doc fixesIgor Minar
2012-01-10feat(module): new module loaderMisko Hevery
2011-12-06docs(ng:submit): update docs example to not add empty itemsVojta Jina
2011-12-06feat(form): do not prevent submission if action attribute presentVojta Jina
2011-11-30feat($interpolate): string interpolation functionMisko Hevery
2011-11-21fix(scope): $watch (and angular.equals) should support NaN valuesCodier
- since NaN !== NaN in javascript digest can get into an infinite loop when model value is set to NaN - angular.equals(NaN, NaN) should return true since that's what we expect when comparing primitives or objects containing NaN values Previously NaN because of its special === properties was used as the initial value for watches, but that results in issues when NaN is used as model value. In order to allow for model to be anything incuding undefined and NaN we need to mark the initial value differently in a way that would avoid these issues, allow us to run digest without major perf penalties and allow for clients to determine if the listener is being called because the watcher is being initialized or because the model changed. This implementation covers all of these scenarios. BREAKING CHANGE: previously to detect if the listener was called because the watcher was being initialized, it was suggested that clients check if old value is NaN. With this change, the check should be if the newVal equals the oldVal. Closes #657
2011-11-14refactor(injector): removed loadModule/ng:moduleMisko Hevery
- added module property to doc:example
2011-11-14style(docs): make jslint happy - fix some warningsVojta Jina
2011-11-14fix(doc) cleanup all api doc link warningsMisko Hevery
2011-11-14new(directive): added ng:module directive for loading modulesMisko Hevery
2011-11-14refactor(filter): filters are now injectable and servicesMisko Hevery
BREAK: - removed CSS support from filters
2011-11-14refactor(parser): turn parser into a service (keep compatibility hack)Misko Hevery
2011-11-14refactor($service): removed almost all references to scope.$serviceMisko Hevery
- still need to remove from factory
2011-11-08fix(directives): make directive names case-insensitiveIgor Minar
+ tests + added docs for angular.directive
2011-11-08feat(ng:style): compatibility + perf improvementsDhruv Manek
- better compatibility with 3rd party code - we clober 3rd party style only if it direcrtly collides with 3rd party styles - better perf since it doesn't execute stuff on every digest - lots of tests
2011-11-08docs(ng:bind-attr): improve examplesIgor Minar
2011-10-12docs(*): remove @workInProgress from everywhereIgor Minar
it's not useful any more and it only makes the docs look ugly
2011-10-12refactor(ng:bind-attr): simplify impl by leveraging jqueryIgor Minar
2011-10-12fix(ng:class): ignore undefined or NaN classnamesIgor Minar
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11refactor(bindings): remove the decoration of the DOM with errors.Misko Hevery
Only $exceptionHandler gets notified now.
2011-10-11refactor(injection) infer injection args in ng:controller onlyMisko Hevery
Because only controllers don't have currying, we can infer its arguments, all other APIs needing currying, automatic inference complicates the matters unecessary.
2011-09-28chore(directives): add a todo for ng:styleIgor Minar
2011-09-16fix(e2e tests): use prop() instead of attr() and quote attributesIgor Minar
Because of changes in jQuery, we need to use element().prop() instead of element().attr() to retrieve className and other element properties. Additionally all attribute selectors (e.g. input[name=value]) must have value quoted if it contains dots (".").
2011-09-01docs(ng:bind): fix example codeIgor Minar
2011-09-01fix(ng:class): make ng:class friendly towards other code adding/removing classesIgor Minar
ng:class as well as ng:class-odd and ng:class-even always reset the class list to whatever it was before compilation, this makes it impossible to create another directive which adds its own classes on the element on which ng:class was applied. the fix simply removes all classes that were added previously by ng:class and add classes that the ng:class expression evaluates to. we can now guarantee that we won't clobber stuff added before or after compilation as long as all class names are unique. in order to implement this I had to beef up jqLite#addClass and jqLite#removeClass to be able to add/remove multiple classes without creating duplicates.
2011-09-01docs(API): various api doc fixes from ToniIgor Minar
2011-08-24feat(ng:cloak): add ng:cloak directiveIgor Minar
2011-08-24doc(API): various API documentation improvementsToni Thompson
2011-08-15refactor(jqLite): remove jqLite show/hide supportIgor Minar
it turns out that even with our tricks, jqLite#show is not usable in practice and definitely not on par with jQuery. so rather than introducing half-baked apis which introduce issues, I'm removing them. I also removed show/hide uses from docs, since they are not needed. Breaks jqLite.hide/jqLite.show which are no longer available.
2011-08-15style(*): wrap all assignments in if statementsIgor Minar
we commonly assign stuff in if statments like this: if (variable = someFn()) { //do something with variable } This results in lint and IDE warnings (did you mean ==?). It is better to be explicit about our intention and wrap the assignement into parens: if ((variable = someFn())) { //do something with variable } Doing so suppresses warnings + is easier to understand the intention. I verified that the closure compiler strips the extra parens, so there is no byte overhead for this safety practice. We should use this style going forward...