Commit graph

611 commits

Author SHA1 Message Date
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
5432dd289a pass undefined through fn closure for better minification 2011-03-09 13:41:16 -08:00
Misko Hevery
194b2c1ea0 Fix IE: reffering to non existent var on window, must be prefixed by window 2011-03-09 13:40:47 -08:00
Misko Hevery
f7a9ea6a41 fix ie7 regression in jqLite which prevented 2011-03-08 20:23:19 -08:00
Misko Hevery
4c762bfe5c fix orberBy documentation error 2011-03-05 22:54:41 -08:00
Igor Minar
e80a64883d re-eagarizing the $hover service - mea culpa 2011-03-03 23:14:43 -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
cd139f5767 $xhr service now autodetects and strips )]}',\n
")]}\',\n" is a commonly used security prefix added to json http
responses iat google and elsewhere in order to prevent certain
cross-site attacks

$xhr service now autodetects the prefix and strips it before
deserializing the json.

the implementation should be more flexible to allow for wider range
of prefixes, but we need this one right now and can address other
usecases later.
2011-03-02 22:56:14 -08:00
Igor Minar
95a29d7bde additional fixes for the angular.compile docs 2011-03-01 19:08:30 -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
Igor Minar
a709dc19b8 adding an extra injector spec
- added a spec for dependency graph resolution
- also simplyfying cache presence check
2011-02-27 16:19:21 -08:00
Igor Minar
65585a2d3c $cookie factory fn should not run $eval 2011-02-27 15:54:06 -08:00
Misko Hevery
edbe9d8ca8 Added delay parameter to the $defer service 2011-02-25 11:30:22 -08:00
Misko Hevery
9e67da420b Corrected an issue where properties inherited from __proto__ show up in ng:repeat.
Closses #112
2011-02-25 09:23:30 -08:00
Misko Hevery
c7998f5f99 add class on any namespace elments 2011-02-22 15:23:08 -08:00
Misko Hevery
5a3c9190dc correct hashchange event registration on window 2011-02-19 20:39:46 -08:00
Misko Hevery
87cbf9f591 Remove ng:watch
Closes#143
2011-02-18 14:22:51 -08:00
Misko Hevery
fd6e5e3f31 replace smart-quotes with regular quotes 2011-02-18 14:02:21 -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
Igor Minar
a070ff5ad0 make all built-in services lazy
now that we require DI everywhere, we don't need any of these
services to be eager - they get initialized when and only when
they are requested.
2011-02-17 22:58:59 -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
Misko Hevery
ef4bb28be1 Change API angular.compile(element)([scope], [element/true]) 2011-02-16 01:03:12 -05:00
Misko Hevery
496e6bf901 refactored quickClone to cloneNode and exposed it on jQuery 2011-02-16 00:49:16 -05:00
Misko Hevery
23b255a8b7 remove $init on scope from applying compilation template
Closes #40
2011-02-16 00:49:15 -05:00
Misko Hevery
e2154cbc0b remove dom manipulation API from compiler 2011-02-16 00:48:22 -05:00
Misko Hevery
0a5c00abf8 Add public API to retrieve scope from element. 2011-02-16 00:48:22 -05:00
Misko Hevery
a004d487c4 allow jquery to be declared after angular in the script loading order 2011-02-16 00:48:22 -05:00
Misko Hevery
037f30a0c9 added missing semicolons 2011-02-16 00:48:21 -05:00
Igor Minar
c37bb2dc28 improving the $document docs
Closes #276
2011-02-16 00:10:47 -05:00
Anthony Lieuallen
7cf70c587e Small spelling and grammar fixes in documentation. 2011-02-16 00:04:15 -05:00
Igor Minar
1777110958 split up services into individual files
- split up services into files under src/service
- split up specs into files under test/service
- rewrite all specs so that they don't depend on one global forEach
- get rid of obsolete code and tests in ng:switch
- rename mock $log spec from "$log" to "$log mock"
2011-02-15 11:01:53 -05:00
Igor Minar
d2089a1633 docs - adding cross links from directives to guide.expression 2011-02-14 11:42:58 -05:00
Igor Minar
e9ce22592a $resource should encode url params with encodeURIComponent 2011-02-10 17:57:42 -08:00
Igor Minar
86321d1f57 add support for hashSearch redirection and custom redirection functions 2011-02-07 23:56:33 -08:00
Igor Minar
8724e97b7e $route redirection should interpolate variables 2011-02-07 23:56:33 -08:00
Igor Minar
bf8013ad57 $location.updateHash should not preserve hashSearch when hashSearch is undefined 2011-02-07 23:56:32 -08:00
Igor Minar
a6c45c3e66 add description for ng:controller example 2011-02-07 23:55:46 -08:00
Igor Minar
e626f95469 $resource service docs 2011-02-07 23:55:42 -08:00
Igor Minar
2fab1a2da9 docs for $xhr, $xhr.error and $xhr.cache 2011-02-07 23:55:03 -08:00
Igor Minar
ae20f0c1b3 adding docs for angular.markup and angular.attrMarkup 2011-02-07 23:55:02 -08:00
Igor Minar
ea9ca651d2 fix how redirection is handled and tested 2011-02-06 09:35:14 -08:00
Igor Minar
d6db4b1749 fix typo in $browser mock
Closes #260
2011-02-04 14:23:51 -08:00
Vojta Jina
9798f5e35f mock $log: fixed bug, added some tests
I extracted mock $log factory into stand alone function, so we can access it and test, because this service is rewritten by real service during testing, so we can't access it through angular.$service('$log')...
2011-02-04 14:18:28 -08:00
Igor Minar
fbc7f1b454 ng:view should be nestable in ng:include 2011-02-04 14:11:53 -08:00
Igor Minar
bf7c9d9900 $route.onChange should return the registered fn 2011-02-04 14:11:52 -08:00