Commit graph

84 commits

Author SHA1 Message Date
Igor Minar
fbc7f1b454 ng:view should be nestable in ng:include 2011-02-04 14:11:53 -08:00
Misko Hevery
ba6b68b6ae changed the documentation @example to use <doc:example> 2011-02-01 10:00:09 -08:00
Igor Minar
9e0fa5b7c8 compile but don't bind option elements nested in a nameless select
otherwise an exception is thrown unexpectidly
2011-01-25 20:49:25 -08:00
Igor Minar
a5990050d4 ng:view should propagate evals to the current child scope
- this change is needed because of previously reverted $route changes
  that used to propagate evals automatically.
- also added docs to highlight how the eval propagation works
2011-01-24 14:03:43 -08:00
Igor Minar
8d507df8c9 Revert "$route should create child scope via $new"
This reverts commit a5eb3ed107.

See 9ca2facb for reasoning.
2011-01-24 14:03:42 -08:00
Igor Minar
567f33823b Revert "fix ng:include issue introduced by a5eb3ed1"
This reverts commit 17ee0f031a.

this and a5eb3ed1 introduced scope leakage that can't be resolved
until we fix up scope relationships and eval propagation.
I'm reverting both this and a5eb3ed1 until we can properly address
the issue.
2011-01-24 14:03:42 -08:00
Igor Minar
17ee0f031a fix ng:include issue introduced by a5eb3ed1 2011-01-19 21:47:14 -08:00
Igor Minar
10646c9f6f add ng:view widget 2011-01-19 15:53:59 -08:00
Igor Minar
a5eb3ed107 $route should create child scope via $new 2011-01-19 15:52:27 -08:00
Misko Hevery
5be92f7b9c fix broken build for IE. Read option.type==select-multiple rather then check presence of multiple attribute 2011-01-18 15:02:51 -08:00
Misko Hevery
1d7b9d5626 support compilation in HTML widgets 2011-01-14 10:30:05 -08:00
Misko Hevery
347be5ae9a fixed select with ng:format
select (one/multiple) could not chose from a list of objects, since DOM requires string ids.
Solved by adding index formatter, which exposed incorrect handling of formatters in select
widgets.
2011-01-14 10:30:00 -08:00
Misko Hevery
4f22d6866c complete rewrite of documentation generation
- romeved mustache.js
- unified templates
- improved testability of the code
2011-01-10 11:50:11 -08:00
Igor Minar
0a6cf70deb Rename angular.foreach to angular.forEach to make the api consistent.
camelcase is used for other angular functions and forEach is also
used by EcmaScript standard.

- rename the internal as well as the external function name
- tweak the implementation of the function so that it doesn't
  clober it self when we extend the angular object with an
  object that has a forEach property equal to this forEach function

Closes #85
2011-01-10 10:26:55 -08:00
Misko Hevery
47c454a315 change to keydown from keyup; add delayed $updateView
- There was a perceived lag when typing do to the fact that we were
   listening on the keyup event instead of keydown. The issue with
   keydown is that we can not read the value of the input field. To
   solve this we schedule a defer call and perform the model update
   then.

 - To prevent calling $eval on root scope too many times as well as to
   prevent drowning the browser with too many updates we now call the
   $eval only after 25ms and any additional requests get ignored. The
   new update service is called $updateView
2011-01-07 14:39:46 -08:00
Igor Minar
b2631f6170 rename scope.$inject to scope.$service
see changelog diff for more info
2011-01-04 18:04:00 -08:00
Igor Minar
3ea5941f0e removing support for 'eager-published' services 2011-01-04 16:40:41 -08:00
Misko Hevery
ec4d446f89 Closes #153: input widgets without name are ignored 2010-12-11 08:28:11 -08:00
Misko Hevery
b225083a21 Fire $eval only if the value has actually changed on input 2010-12-11 08:27:52 -08:00
Misko Hevery
5a8ad8fe32 Closes #170. Corrected the behavior of select when options are ng:repeated
- Delete $postEval method, as it was a hack
2010-12-02 22:45:57 -08:00
Igor Minar
fc7f11d03b add @workInProgress tag and mark all @ngdocs as work in progress 2010-11-18 16:28:42 -08:00
Igor Minar
c635b69f5c fix docs and examples for ng:format, ng:required and ng:validate 2010-11-18 02:35:30 -08:00
Igor Minar
522ec1a9ec move attribute widgets to widgets.js file
- move @ng:repeat to widgets.js and its specs to widgetsSpecs.js
- move @ng:non-bindable to widgets.js and its specs to widgetsSpecs.js
- make widget.template suitable for attribute widgets
- fix up the js docs for attribute widgets
2010-11-18 02:35:29 -08:00
Igor Minar
a130bb899d add onload attribute to ng:include 2010-11-16 11:35:43 -08:00
Misko Hevery
7e6f999221 added remaining directives and search box. 2010-11-15 10:04:17 -08:00
Misko Hevery
0499c47270 added ng:switch-when-default; changed $watch to always fire on init. (may be backward incompatible) 2010-11-10 21:01:17 -08:00
Igor Minar
324694a58b Better example widget
- syntax highlighting
- tabless design
- rename widget to doc:example
- rename widget files (wiki_widget.* -> doc_widget.*)
- example section is now optional
2010-11-09 22:27:31 -08:00
Misko Hevery
91b6c5f7ff Added documentation for validators.
BACKWARD INCOMPATIBLE: removed ssn validators, since it is unlikely that most people will need it and if they do, they can added it thorough RegExp
2010-11-07 13:06:55 -08:00
Misko Hevery
dc66687149 added tests for documentation 2010-11-05 15:05:24 -07:00
Misko Hevery
47066e70e1 added documentation for ng:include and ng:widget and test for doc collector. 2010-11-04 14:24:31 -07:00
Misko Hevery
659af29adb jsdoc parser + generator + viewer + scenario runner
- parse jsdocs from source code
- generate prerendered (markdown + mustache) partials
- generate json
- generate scenario runner for examples in docs
- basic angular doc viewer
2010-11-03 09:47:22 -07:00
Misko Hevery
9c0225512c fixes IE related failures, and form submit event handling in ie 2010-10-26 16:33:59 -07:00
Misko Hevery
d74ef497de Fix for getting into recursive $eval on scope. Close #59
It sort of worked since the browser would throw stack too deep
exception and the angular would then print the error to console.
So as long as you did not have console open you would not notice
this as an error.
2010-10-23 13:42:11 -07:00
Misko Hevery
9e9bdbdc40 JSON parser is now strict (ie, expressions are not allowed for security)
Close #57
2010-10-18 08:50:36 -07:00
Igor Minar
54090d7766 ng:include should remove the reference to childScope when src is blank 2010-10-16 22:10:01 -07:00
Misko Hevery
d9abfe8a7e Introduced injector and $new to scope, and injection into link methods and controllers
- added angular.injector(scope, services, instanceCache) which returns inject
    - inject method can return, instance, or call function which have $inject
      property
    - initialize services with $creation=[eager|eager-publish] this means that
      only some of the services are now globally accessible
  - upgraded $become on scope to use injector hence respect the $inject property
    for injection
    - $become should not be run multiple times and will most likely be removed
      in future version
  - added $new on scope to create a child scope
     - $inject is respected on constructor function
  - simplified scopes so that they no longer have separate __proto__ for
    parent, api, behavior and instance this should speed up execution since
    scope will now create one __proto__ chain per scope (not three).

BACKWARD COMPATIBILITY WARNING:
  - services now need to have $inject instead of inject property for proper
    injection this breaks backward compatibility
  - not all services are now published into root scope
    (only: $location, $cookie, $window)
  - if you have widget/directive which uses services on scope
    (such as this.$xhr), you will now have to inject that service in
    (as it is not published on the root scope anymore)
2010-10-12 16:33:06 -07:00
Igor Minar
451a711343 fix global namespace polution with invalidWidgets 2010-10-13 04:37:46 +08:00
Igor Minar
70ff7a2639 fix memory leak caused by leftbehind $invalidWidgets references
- ng:switch should not clean up $invalidWidgets
- $invalidWidgets should be clean up after each eval
- add missing docs
2010-10-13 04:37:46 +08:00
Elliott Sprehn
8e40e7070d Fix bug in IE where clone removes whitespace nodes. 2010-10-05 07:12:13 +08:00
Igor Minar
8248e77a7b 'A' tag widget and ng:click propagation change
* added a widget for A (anchor) tag, that modifies the default behavior
  and prevent default action (location change and page reload) for tags
  with empty href attribute
* stopped event propagation for all ng:click handlers
2010-10-01 07:44:46 +08:00
Misko Hevery
006fd2ca25 HEAD is now at 10c0151 Fixes on issue when a SELECT has OPTION which are data bound (ie OPTION has repeater or OPTION.value is bound), then SELECT does not update to match the correct OPTION after the change in model (ie after the OPTION repeater unrolls or OPTION.value is changed.) 2010-09-21 19:20:34 +02:00
Misko Hevery
2a3a449c6d merge 2010-09-14 23:42:43 +02:00
Misko Hevery
5ddd8d9586 stringify names for better compression, remove dead functions, removed underscore.js compatibility 2010-08-18 17:26:33 -07:00
Igor Minar
0df7329a6a fix for ng:include does not remove partial if src goes to undefined 2010-08-16 16:47:39 -07:00
Misko Hevery
2a30a02f01 fix preventDefault for events 2010-07-27 15:54:50 -07:00
Misko Hevery
bebfbeac0a fixed xhtml compatibility, fix console in chrome 2010-07-20 16:55:32 -07:00
Misko Hevery
9abd10e7b8 proper handlig of $element in filters 2010-07-15 13:13:21 -07:00
Misko Hevery
10cd9751ea ng-change ng:change 2010-07-13 15:21:42 -07:00
Misko Hevery
87cfc27be3 changed remaining ng- to ng: 2010-07-13 11:20:11 -07:00
Misko Hevery
1f05621509 change all attributes from ng- to ng: prefix 2010-07-02 15:39:57 -07:00