Commit graph

25 commits

Author SHA1 Message Date
Vojta Jina
992c790f07 refactor(scope): separate controller from scope
Controller is standalone object, created using "new" operator, not messed up with scope anymore.
Instead, related scope is injected as $scope.

See design proposal: https://docs.google.com/document/pub?id=1SsgVj17ec6tnZEX3ugsvg0rVVR11wTso5Md-RdEmC0k

Closes #321
Closes #425

Breaks controller methods are not exported to scope automatically
Breaks Scope#$new() does not take controller as argument anymore
2012-01-23 11:05:36 -08:00
Misko Hevery
d648d709f3 refactor(module): strict separation between module-config / app-runtime 2012-01-12 13:40:07 -08:00
Misko Hevery
5143e7bf06 feat(module): new module loader 2012-01-10 22:27:00 -08:00
Misko Hevery
e88dfb734a refactor(injector): $injector is no longer a function.
- $injector('abc') -> $injector.get('abc');
- $injector(fn) -> $injector.invoke(null, fn);
2011-11-14 20:31:19 -08:00
Vojta Jina
acbd7cdf32 style(docs): make jslint happy - fix some warnings 2011-11-14 20:31:19 -08:00
Misko Hevery
9c06394376 chore(scenario tests): make scenario tests pass again 2011-11-14 20:31:15 -08:00
Misko Hevery
4b35a59c6a refactor(scenario): fix scenario bootstrap & publish injector for inspection 2011-11-14 20:31:14 -08:00
Misko Hevery
c27aba4354 refactor(api): remove type augmentation
BREAK:
  - remove angular.[Object/Array/String/Function]
  - in templates [].$filter(predicate) and friends need to change to [] | filter:predicate
2011-11-14 20:31:14 -08:00
Misko Hevery
bd04316a89 refactor(services): migrate angular.service -> module 2011-11-14 16:39:33 -08:00
Misko Hevery
ed36b9da3b refactor(injector): switch to injector 2.0 introduce modules 2011-11-14 16:39:32 -08:00
Misko Hevery
48697a2b86 refactor(injector): turn scope into a service
- turn scope into a $rootScope service.
- injector is now a starting point for creating angular application.
- added inject() method which wraps jasmine its/beforeEach/afterEach,
  and which allows configuration and injection of services.
- refactor tests to use inject() where possible

BREAK:
- removed angular.scope() method
2011-11-14 16:39:31 -08:00
Igor Minar
578e38e0af fix(example): fixes for personalLog e2e tests
Looks like this got broken with scope rewrite.
2011-10-26 12:57:14 -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
Vojta Jina
805e083c24 Remove trailing white spaces from all source files
find . -name "*.js" -print | xargs sed -Ei s/[[:space:]]*$//
2011-05-19 09:43:56 -07:00
Vojta Jina
1abdc097b2 JSTD adapter for running e2e tests
Couple of changes into angular.scenario runner:
 - add autotest config (runs tests when document ready)
 - update ObjectModel (forwards events)
 - use only one ObjectModel instance for all outputters
 - expose error msg and line number in ObjectModel.Spec and ObjectModel.Step
 - fix generating spec.ids
 - fix 'html' output so that it does not mutate ObjectModel

Couple of changes into docs / generator:
 - rename copy -> copyTpl
 - move docs/static into docs/examples (to avoid conflict with jstd proxy)

Running all docs e2e tests:
========================================================
1/ compile angular-scenario, jstd-scenario-adapter
>> rake compile

2/ build docs
>> rake docs

3/ start jstd server
>> ./server-scenario.sh

4/ capture some browser

5/ run node server to serve static content
>> node ../lib/nodeserver/server.js

6/ run tests
>> ./test-scenario.sh
2011-05-19 09:43:56 -07:00
Igor Minar
67d064820c fixing up personalLog app 2011-01-04 18:04:01 -08:00
Igor Minar
b2631f6170 rename scope.$inject to scope.$service
see changelog diff for more info
2011-01-04 18:04:00 -08:00
Misko Hevery
d0270d9256 Remove many eager-publish services, lazy polling
- Browser now starts the poller on first call to addPollFn()

- Many services ($location, $cookies, $router) are no longer eager-publish. The result is that
  unless someone needs the $cookies, they will not cause the Browser to start polling for them.
2011-01-04 16:40:40 -08:00
Elliott Sprehn
faa7d81b67 Add browser().reload() to simulate a refresh from a user 2010-11-01 17:24:24 -07:00
Elliott Sprehn
6bb2cd6ee2 Provide browser DSL with location() to expect the iframe URL parts. Also move navigateTo() under the browser DSL. 2010-11-01 15:21:37 -07:00
Igor Minar
01c52e92b1 Adding e2e tests for the PersonalLog app
- added scenario runner
- added scenario specs
- cookie cleaning DSL
- making rmLog independent on ordering in the view
2010-10-26 21:58:00 -07:00
Misko Hevery
9c0225512c fixes IE related failures, and form submit event handling in ie 2010-10-26 16:33:59 -07:00
Igor Minar
4fc2141458 improving the PersonalLog app
- adding jsdocs and comments
- logs should be ordered in inverse order
2010-10-23 16:25:53 -07:00
Igor Minar
5b40e87ac6 personalLog demo - initial version with spec 2010-10-23 14:38:08 -07:00