Commit graph

206 commits

Author SHA1 Message Date
Dhruv Manek
163c799eff fix(angular.widget): Allow widgets to be styled in IE8 and below
Closes #584
2011-10-24 23:28:36 -07:00
Misko Hevery
fd822bdaf9 chore(formating): clean code to be function() { 2011-10-11 11:01:46 -07:00
Misko Hevery
4f78fd692c feat(forms): new and improved forms 2011-10-11 11:01:45 -07:00
Misko Hevery
e86c435349 refactor(bindings): remove the decoration of the DOM with errors.
Only $exceptionHandler gets notified now.
2011-10-11 10:53:07 -07:00
Misko Hevery
bda2bba2be feat(jqlite): added .inheritedData method and $destroy event.
- refactored .scope() to use .inheritedData() instead.
- .bind('$destroy', callback) will call when the DOM element is removed
2011-10-11 10:53:05 -07:00
Igor Minar
3ace81b92a fix(e2e tests): use prop() instead of attr() and quote attributes
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-16 02:44:35 +02:00
Kai Groner
7e1f364177 fix($location): Use encodeUriQuery instead of escape
Closes #492
2011-09-08 23:00:59 +02:00
Igor Minar
a5607e3061 docs(API): various api doc fixes from Toni 2011-09-01 00:19:35 -07:00
Igor Minar
825cbadf80 kill(merge): removing merge fn - dead buggy code with no specs 2011-08-31 22:32:27 -07:00
Toni Thompson
446f6b233f doc(API): various API documentation improvements 2011-08-24 11:06:55 +02:00
Igor Minar
793ecb4817 refactor(jqLite): remove jqLite show/hide support
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-15 12:51:41 -07:00
Misko Hevery
42062dab34 refactor(scope): remove $flush/$observe ng:eval/ng:eval-order 2011-08-12 15:47:47 -07:00
Igor Minar
06835a462a style($function): replace $function with 'function' 2011-08-06 01:54:06 -07:00
DiPeng
67a3315e1d refactor(angular): remove unnecessary parameter for slice function
- the end index for slice, if not specified, is default to the
end of the array it operates on.
2011-08-02 07:11:47 -07:00
Misko Hevery
8f0dcbab80 feat(scope): new and improved scope implementation
- Speed improvements (about 4x on flush phase)
- Memory improvements (uses no function closures)
- Break $eval into $apply, $dispatch, $flush
- Introduced $watch and $observe

Breaks angular.equals() use === instead of ==
Breaks angular.scope() does not take parent as first argument
Breaks scope.$watch() takes scope as first argument
Breaks scope.$set(), scope.$get are removed
Breaks scope.$config is removed
Breaks $route.onChange callback has not "this" bounded
2011-08-02 01:00:03 +02:00
dandoyon
1f4b417184 doc(typos): fix couple of typos in the docs
Minor documentation fixes. Should not be any code changes.
One test changed due to dependency on text in documentation.
2011-07-30 16:41:42 +02:00
Vojta Jina
f39420e7d7 style(): fix couple of missing semi-colons 2011-07-27 22:24:07 +02:00
Di Peng
f3e04fbd6a fix(ng:show/ng:hide): use jqLite.show/jqLite.hide
The previous implementation didn't handle situation when in css
something was hidden with a cascaded display:none rule and then we
wanted to show it.

Unfortunatelly our test doesn't test this scenario because it's too
complicated. :-/
2011-07-26 14:21:13 -07:00
Di Peng
0782422d1f feat(angular.version): add angular.version
- placeholders are replaced with actual angular versions when doing
rake compile
2011-07-22 15:34:55 -07:00
Igor Minar
fe5240732d feat(strict mode): adding strict mode flag to all js files
the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd

the following script was used to modify all files:

for file in `find src test -name "*.js"`; do
  echo -e "'use strict';\n" > temp.txt
  cat $file >> temp.txt
  mv temp.txt $file
done
2011-07-18 12:12:55 -07:00
Igor Minar
4c6d26a38f fix(strict mode): fix all issues discovered by strict mode and unit/e2e tests 2011-07-18 12:12:54 -07:00
Vojta Jina
330d1a870d fix(bootstrap): Fix bootstrap on IE<8
No reason for including ie-compat in bootstrap, it's included during angularInit.

Fix including ie-compat even for production.
2011-07-13 16:21:07 -07:00
Misko Hevery
af285dd370 Added ng:options directive
Closes #301
2011-06-08 15:21:33 -07:00
Misko Hevery
2a12f7dcaa Added nextUid() function for unified way of generating IDs in angular 2011-06-08 15:01:32 -07:00
Misko Hevery
cc9f1fdf38 Proper handling of special attributes in jqlite 2011-06-08 13:49:11 -07:00
Misko Hevery
ec6d106d4a code cleanup: missing ; and indentation 2011-06-08 13:49:11 -07:00
Misko Hevery
a23d15ad3a Remove stray console.log statemente 2011-06-08 11:52:12 -07:00
Igor Minar
6e4a501127 another batch of doc fixes from ken 2011-06-06 23:10:29 -07:00
Vojta Jina
b6db58c647 Fix formatError for FF4 and Opera
Other browsers prepend "Error: <Exception name>" to stack, but FF4 and Opera do not.
So when formatting error we prepend it by hand, when not present...
2011-06-02 12:51:12 -07:00
Craig Tataryn
64938a2e81 Added a bit more documentation to ng:autobind to explain some of the semantics 2011-04-16 14:36:47 -07:00
Kenneth R. Culp
3d787ab6f4 doc fix - ng:autobind, ng:controller and more 2011-04-11 07:20:30 -07:00
Igor Minar
0d2d7025e6 use special nodeName_ impl only for IE<9
apparently IE9 is one step closer to becoming a real browser by
treating xmlns-like ("foo:") prefixes in node names as part of the
node name.

fixes:
https://groups.google.com/forum/?lnk=srg#!topic/angular/TGdrV4GsL8U
2011-04-07 14:56:57 -07:00
Igor Minar
d517bcad5b improve docs for angular.Object.copy 2011-04-07 12:48:14 -07:00
Igor Minar
cf1d365f57 fix infinite loop in elementError when working with detached elements 2011-03-31 21:48:52 -07:00
Igor Minar
78a0f41058 encode query params correctly but not too agressively 2011-03-31 21:45:28 -07:00
Igor Minar
a4863d5244 correct size() impl for object's w/ 'length' prop
the original implementation returned incorrect value value for
objects with 'length' property.
2011-03-30 15:24:03 -07:00
Igor Minar
96a1df192a extend size() to take ownPropsOnly param
- extend size() to take size(obj, ownPropsOnly)
- add specs for size()
- update docs to mention string support
- use size() in ng:repeat

including the hasOwnProp check for all object doesn't create
significant perf penalty:
http://jsperf.com/dedicated-code-branch-for-hasownprop
2011-03-30 15:24:03 -07:00
Igor Minar
885c3ad5dd fixing lint warnings 2011-03-28 23:15:28 -07:00
Igor Minar
1e59822df7 remove _null and _undefined
they have no significant effect on minified and gziped size. in fact
they make things worse.

file        | before     | after removal
----------------------------------------
concat      | 325415     | 325297
min         | 62070      | 62161
min + gzip  | 25187      | 25176

The bottom line is that we are getting 0.05% decrease in size after
gzip without all of the hassle of using underscores everywhere.
2011-03-26 23:19:04 -07:00
Igor Minar
9d5c533791 ng:autobind now optionally takes element id
so it is possible to easily compile just a part of a document.

e.g.:

<html>
  <head>
    <title>partially compiled doc</title>
    <script src="angular.js" ng:autobind="compileThis"></script>
  </head>
  <body>
    this part won't be compiled: {{1+2}}
    <div id="compileThis" ng:init="i=0" ng:click="i = i+1">
      Click count: {{i}}
    </div>
  </body>
</html>
2011-03-11 08:45:43 -08:00
Igor Minar
7414e7b533 angularJsConfig now allows ng:autobind and #autobind value to be passed in 2011-03-11 08:45:16 -08:00
Misko Hevery
f7a9ea6a41 fix ie7 regression in jqLite which prevented 2011-03-08 20:23:19 -08:00
Igor Minar
8b2753eee2 fixing left over .scope 2011-03-03 23:14:43 -08:00
Igor Minar
5bf7ff5a3e fixing broken e2e tests 2011-03-03 13:50:12 -08:00
Igor Minar
945056b166 linking function should return bound scope
angular.compile()() returns {scope:scope, view:view},
this isn't useful at all and only makes tests more verbose.
Instead, this change makes the linking function return scope directly
and if anyone needs the linked dom there are two ways to do it
documented in angular.compile.

other changes:
- moved angular.compile docs to the compiler so that they are closer to
  the compiler
- fixed some typos and updated angular.compile docs with the new return
  value
2011-03-01 17:09:25 -08:00
Misko Hevery
7d4aee31bb Auto create $inject property form the argument names. Any arg starting with $ or _ will be injected 2011-02-18 13:14:07 -08:00
Igor Minar
9e30baad3f resources should not over-encode chars in url path
- added encodeUriSegment that properly encodes only those chars
  that URI RFC requires us to encode
- modified Resource to use encodeUriSegment
2011-02-17 23:06:53 -08:00
Misko Hevery
c90abf057b Changed the angular.compile(element)(scope[, cloneAttachNode]) 2011-02-16 08:59:57 -05:00
Misko Hevery
cdc093a463 reformated multiline trinary expressions to have a leading ?/:. 2011-02-16 08:59:57 -05:00
Misko Hevery
00cc9eb32a rewrite of JQuery lite implementation, which now better supports selected sets 2011-02-16 08:59:42 -05:00