Commit graph

18 commits

Author SHA1 Message Date
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
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
Misko Hevery
fa0702bad1 change order of initialization 2010-05-28 10:32:03 -07:00
Misko Hevery
843bd355d2 various bug fixes 2010-04-09 16:20:15 -07:00
Misko Hevery
2107eafcde added hover service 2010-04-05 20:53:33 -07:00
Misko Hevery
7a4b480206 added ng:switch widget 2010-04-05 11:46:53 -07:00
Misko Hevery
5dcf9bb4fe browser is now injectable into the system 2010-04-03 20:23:16 -07:00
Misko Hevery
a80a61839a injection is now working 2010-04-03 17:04:36 -07:00
Misko Hevery
85f13d602e work on $location and autobind 2010-04-01 14:10:28 -07:00
Misko Hevery
258ca5f165 moved all uneeded files out, widgets.html works, tests horribly broken 2010-03-26 16:27:18 -07:00
Adam Abrons
2df072e3f8 twitter using resources 2010-03-16 14:38:56 -07:00
Misko Hevery
2880411713 added bootstrap, fixed formatter 2010-01-29 10:15:15 -08:00
Misko Hevery
595b4ea097 checkpoint for integration with angular 2010-01-18 10:47:03 -08:00
Misko Hevery
6d5471c9be all files converted to prototype= {} 2010-01-11 17:32:33 -08:00
Misko Hevery
9b9a0dadcc removed nglr namespace 2010-01-09 15:02:43 -08:00
Misko Hevery
214c142d9d created a way to init the code without autobootstrap 2010-01-08 16:04:35 -08:00
Adam Abrons
c9c176a53b angular.js 2010-01-05 16:36:58 -08:00