Commit graph

51 commits

Author SHA1 Message Date
Misko Hevery
62c0e5c460 Fix failing tests for ie, and mark elements as ng-widget, ng-directive, and ng-binding 2010-10-27 15:42:46 -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
4fdab37659 create HTML sanitizer to allow inclusion of untrusted HTML in safe manner.
Sanitization works in two phases:
 1) We parse the HTML into sax-like events (start, end, chars).
    HTML parsing is very complex, and so it may very well be that what
    most browser consider valid HTML may not pares properly here,
    but we do best effort. We treat this parser as untrusted.
 2) We have safe sanitizeWriter which treats its input (start, end, chars)
    as untrusted content and escapes everything. It only allows elements
    in the whitelist and only allows attributes which are whitelisted.
    Any attribute value must not start with 'javascript:'. This check
    is performed after escaping for entity (&xAB; etc..) and ignoring
    any whitespace.

 - Correct linky filter to use safeHtmlWriter
 - Correct html filter to use safeHtmlWriter

Close #33; Close #34
2010-10-26 13:41:07 -07:00
Igor Minar
04a4d8b061 adding ng:submit directive for use with forms
- allows for binding angular expressions to onsubmit events
- prevent default submit action (page reload)
2010-10-23 14:22:54 -07:00
Igor Minar
bbd87c9425 simplifying ng:click spec 2010-10-23 14:22:54 -07:00
Misko Hevery
406373b5db fixed tests 2010-10-19 16:14:16 -07:00
Misko Hevery
3ab49538a4 fixed issue where ng:bind would not reset value if expression returned undefined 2010-10-13 10:51:16 -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
Misko Hevery
772e32c220 change ng:controller to create new scope hence allow nesting 2010-10-08 16:23:26 -07:00
Igor Minar
81052d4a62 fixed lint warnings 2010-10-04 09:00:09 -07: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
f09415d0de merge kai/master 2010-08-14 12:50:39 -07:00
Misko Hevery
2a30a02f01 fix preventDefault for events 2010-07-27 15:54:50 -07:00
Misko Hevery
2987f7f705 fix howers which were accidently broken 2010-07-22 15:32:57 -07:00
Misko Hevery
7cef4358ae fixed build 2010-07-15 14:16:04 -07:00
Misko Hevery
1de82283db proper handlig of $element in filters 2010-07-15 13:35:00 -07:00
Misko Hevery
9abd10e7b8 proper handlig of $element in filters 2010-07-15 13:13:21 -07:00
Misko Hevery
17d2ced9cc appease IE on CSS styles 2010-07-14 17:48:09 -07:00
Misko Hevery
e3e9ac8675 ng:style remembers previous style and properly resets to it 2010-07-14 17:07:23 -07:00
Kai Compagner
0a57273f00 fix undefine style 2010-07-15 07:40:27 +08:00
Kai Compagner
9998b8dcbb fix undefine style 2010-07-14 12:08:55 -07:00
Misko Hevery
228b54aa2e ng:repeat ignores prototype keys 2010-07-09 14:45:29 -07:00
Misko Hevery
1f05621509 change all attributes from ng- to ng: prefix 2010-07-02 15:39:57 -07:00
Misko Hevery
0305b6746e change everything over to jasmine 2010-05-07 13:43:54 -07:00
Misko Hevery
5fdb117b32 clean up failing test with jquery 2010-04-22 22:09:17 -07:00
Misko Hevery
8b29156a2d ie6 now passes 2010-04-21 14:29:05 -07:00
Misko Hevery
e78405f6ed more if tests pass 2010-04-21 12:50:05 -07:00
Misko Hevery
22d93e0a3b fixes to enable ie 2010-04-20 18:14:13 -07:00
Misko Hevery
deb86fe357 lots of small fixes 2010-04-16 14:01:29 -07:00
Misko Hevery
713307b650 added ng-eval-order attribute 2010-04-12 16:24:28 -07:00
Misko Hevery
2637d4e90c removed Meta and allowed binding of HTML 2010-04-12 14:28:15 -07:00
Misko Hevery
41a5c408c2 tests pass jstd has issues 2010-04-08 15:05:05 -07:00
Misko Hevery
c4ef1f2fdd tests failing jstd to show cory 2010-04-08 13:43:40 -07:00
Misko Hevery
e0ad7dfcd4 seperatio validation and exception handling 2010-04-07 17:24:24 -07:00
Misko Hevery
82cb18db28 Merge branch 'directives' of github.com:angular/angular.js into directives 2010-04-07 10:29:47 -07:00
Misko Hevery
0df93fd49c clean up, fixes for app 2010-04-07 10:17:15 -07:00
Misko Hevery
ee327a1f4f few fixes to make tests pass with jquery 2010-04-06 14:04:08 -07:00
Misko Hevery
e646068586 added ng-controller directive 2010-04-05 21:26:52 -07:00
Misko Hevery
1c670b2a7c added ng:include 2010-04-05 14:09:25 -07:00
Misko Hevery
35a9108500 all tests green, some dissabled 2010-03-31 13:57:25 -07:00
Misko Hevery
a7d62dcb55 more tests fixed 2010-03-30 14:55:04 -07:00
Misko Hevery
e55c97deba dissabled a lot of tests, and made the core test set pass. 2010-03-29 20:25:42 -07:00
Misko Hevery
d934054cfc major refactoring of scope 2010-03-25 22:03:11 -07:00
Misko Hevery
b814c79b58 checkbox and radio now working 2010-03-25 13:01:08 -07:00
Misko Hevery
bb98ae14f2 markup now wroks, some refactorings 2010-03-23 14:57:11 -07:00
Misko Hevery
6ff550cfa9 all angular.js directives now work 2010-03-22 21:29:57 -07:00
Misko Hevery
a822708674 rudementary event bind and trigger for jqlite 2010-03-22 20:20:05 -07:00
Misko Hevery
7c87c17d08 upgraded jquery to 1.4.2 and made ng-action work with jquery 2010-03-22 18:20:49 -07:00
Misko Hevery
6f8276a8e3 ng-watch directive 2010-03-22 16:07:42 -07:00
Misko Hevery
b4561ff951 ng-repeat works 2010-03-22 15:46:34 -07:00