Commit graph

101 commits

Author SHA1 Message Date
Igor Minar
dfa8baf59a hide example for angular.filter 2010-11-03 10:02:20 -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
Igor Minar
1fe7e3a130 add jsdocs for angular and filter namespaces + all filters 2010-11-03 09:47:21 -07:00
Misko Hevery
ba5f8ee27f fix typo, and change a list to string for more efficient compression. 2010-10-31 15:04:30 -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
6f3a757a37 Angular should look for angular-ie-compat file at the right location
The location should be based on the base path of the angular script
and the version identifier of the angular script.

ex: angular.js -> angular-ie-compat.js
    js/angular-0.9.0.min.js -> js/angular-ie-compat-0.9.0.js
2010-10-20 14:48:35 -07:00
Igor Minar
644c8514c5 extract and test regexp that identifies angular script tag 2010-10-20 14:48:35 -07:00
Misko Hevery
01c7abab35 Fix browser triggering in scenario to always do native events.
- Also fixed angular.suffix for scenarios
 - refactored click() to browserTrigger()
 - Fixed Rakefile with CSS and jQuery
2010-10-19 15:56:53 -07:00
Igor Minar
7059579c74 inline all images into css
* embedded images as data URIs
* rake task to generate multipart js file with embeded images for IE
* move images into a separate directory outside of src or css and
  keep them there for reference
* clean up Rakefile and ruby code
* .gitignore update
* don't penalize IE 8+ with an extra request to the ie-compat.js file
2010-10-18 16:24:43 -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
Vojta Jina
b08e2be64c Pass the toKeyValue() test - parsing flags 2010-10-16 22:10:01 -07:00
Elliott Sprehn
03df6cbddb New Angular Scenario runner and DSL system with redesigned HTML UI.
Uses the Jasmine syntax for tests, ex:

describe('widgets', function() {
  it('should verify that basic widgets work', function(){
    navigateTo('widgets.html');
    input('text.basic').enter('Carlos');
    expect(binding('text.basic')).toEqual('Carlos');
    input('text.basic').enter('Carlos Santana');
    expect(binding('text.basic')).not().toEqual('Carlos Boozer');
    input('text.password').enter('secret');
    expect(binding('text.password')).toEqual('secret');
    expect(binding('text.hidden')).toEqual('hiddenValue');
    expect(binding('gender')).toEqual('male');
    input('gender').select('female');
    expect(binding('gender')).toEqual('female');
  });
});

Note: To create new UI's implement the interface shown in angular.scenario.ui.Html.
2010-10-14 09:47:39 -07:00
Misko Hevery
805753dba4 fixed issue where date copy creates an object instead of date 2010-10-13 12:47:10 -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
Elliott Sprehn
8e40e7070d Fix bug in IE where clone removes whitespace nodes. 2010-10-05 07:12:13 +08:00
Igor Minar
eb8d46d380 Differentiate between flags and empty keys in $location.hashSearch
* #foo?key=var&flag&emptyKey= should parse into
  {key:'val', flag: true, emptyKey: ''}
* added docs and spec for parseKeyValue function
2010-09-29 09:52:03 -07:00
Igor Minar
7cb7fb91c6 Add JSDoc for the copy() method 2010-09-23 17:19:26 +08:00
Misko Hevery
0649009624 Refactored the Browser:
- change from using prototype to inner functions to help with better compression
  - removed watchers (url/cookie) and introduced a poller concept
  - moved the checking of URL and cookie into services which register with poolers
Benefits:
  - Smaller minified file
  - can call $browser.poll() from tests to simulate polling
  - single place where setTimeout needs to be tested
  - More testable $browser
2010-09-22 16:17:44 +02: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
Alkis Evlogimenos
b798ee80c2 Allow angular to be included with query parameters. This is a common
pattern for forcing a reload of the script in the browser irrespective
of the cache settings the host has.
2010-09-16 00:22:55 +02:00
Misko Hevery
894ffadc8c Fixed all trivial jslint violations 2010-09-14 23:22:15 +02:00
Misko Hevery
07699b1a70 removed accidental assignment of $element to glabal space 2010-09-06 07:46:28 -07:00
Misko Hevery
5ddd8d9586 stringify names for better compression, remove dead functions, removed underscore.js compatibility 2010-08-18 17:26:33 -07:00
Misko Hevery
1087270c95 added better handling of ng:format=number 2010-08-18 16:04:40 -07:00
Misko Hevery
3d5719cd44 removed undocumented/unneeded methods from Array API 2010-08-11 11:44:12 -07:00
Misko Hevery
412f05977c removed google charts and few other filters, switched to simple optimization for compiler 2010-08-11 11:21:03 -07:00
Misko Hevery
49e08f5d2c compile should take existingScope 2010-08-05 14:01:46 -07:00
Misko Hevery
059703495d rename textMarkup to markup 2010-07-30 15:19:43 -07:00
Misko Hevery
cdda664f89 fix up the $location encoding 2010-07-30 10:56:36 -07:00
Misko Hevery
af1eb6914e keep #autobind for backward compatibility 2010-07-29 15:38:14 -07:00
Misko Hevery
03aac8b0ab fix broken build, fix #autobind and css loading 2010-07-29 15:26:10 -07:00
Misko Hevery
1b768b8443 refactored $location service so that it correctly updates under all conditions 2010-07-29 12:54:13 -07:00
unknown
6bd8006edc fix IE native mothods are not functions, and preventDefault 2010-07-27 16:53:23 -07:00
Misko Hevery
b288cb08b4 minor performance improvements 2010-07-26 15:32:08 -07:00
Misko Hevery
b5bbfaeb80 clean up error reporting 2010-07-21 13:28:14 -07:00
Misko Hevery
719f6e15a0 clean up error handling a bit. 2010-07-20 17:13:31 -07:00
Misko Hevery
bebfbeac0a fixed xhtml compatibility, fix console in chrome 2010-07-20 16:55:32 -07:00
Misko Hevery
7e96af0fdd added equals method to angular.equals and $equals 2010-07-19 12:29:24 -07:00
Misko Hevery
9abd10e7b8 proper handlig of $element in filters 2010-07-15 13:13:21 -07:00
Misko Hevery
81dac70e72 imrove $orderBy performance 2010-05-30 20:21:40 -07:00
Misko Hevery
c7d64f6d12 improve error handling with elements 2010-05-30 16:34:59 -07:00
Misko Hevery
d5ba889f63 fixes issues where the field clobbers itself 2010-05-12 15:25:16 -07:00
Misko Hevery
038a743e6f xhr bulk fixes 2010-05-07 12:09:14 -07:00
Misko Hevery
c7913a4b7a added $xhr service with bulk and cache, hooked up $resource 2010-04-29 17:28:33 -07:00
Misko Hevery
2a7cd9f390 fix ie bug with null and orphans elements 2010-04-26 16:49:34 -07:00
Misko Hevery
fe434307d1 tests work under jquery and without 2010-04-22 17:11:56 -07:00
Misko Hevery
2a9669e1d8 working on jQuery passing tests 2010-04-22 15:50:20 -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
9f9bdcf3d1 lint 2010-04-19 14:41:36 -07:00