aboutsummaryrefslogtreecommitdiffstats
path: root/test/widgetsSpec.js
AgeCommit message (Collapse)Author
2012-03-08chore(directives,widgets): reorg the code under directive/ dirIgor Minar
2012-03-08chore(compiler): change default restriction to attribute only for directivesMisko Hevery
2012-03-05fix(ng-include): Compile only contentVojta Jina
2012-02-28feat(ng:include) Fire $contentLoaded eventVojta Jina
+ refactor unload to listen on this event -> we can use unload with ng:view as well Closes #743
2012-02-28refactor(ng:view) Make $route scope agnostic, add $contentLoaded eventVojta Jina
Problems: - controller was instantiated immediately on $afterRouteChange (even if no content), that's different compare to ng:controller, which instantiates controllers after compiling - route listened on current scope ($afterRouteChange), so if you were listening on $rootScope ($afterRouteChange), you get called first and current.scope === undefined, which is flaky - route handles scope destroying, but scope is created by ng:view - route fires after/before route change even if there is no route (when no otherwise specified) Solution: - route has no idea about scope, whole scope business moved to ng:view (creating/destroying) - scope is created (and controller instantiated) AFTER compiling the content - that means on $afterRouteChange - there is no scope yet (current.scope === undefined) - added $contentLoaded event fired by ng:view, after linking the content
2012-02-28refactor($route): remove .parent(); ng:view scope creationMisko Hevery
2012-02-28refactor($route): move when/otherwise to providerMisko Hevery
2012-02-28fix(directive.script): Do not compile content of script tagsVojta Jina
2012-02-21fix(ng:repeat): use transclusionMisko Hevery
2012-02-21chore(ng:switch): rewritten with transclusion APIMisko Hevery
BREAKING CHANGE: the change event fires on scope of switch not on scope of case.
2012-01-30refactor(test): remove odd inject from describeVojta Jina
2012-01-25feat(scriptTemplateLoader): provide template inliningMisko Hevery
populates $templateCache with content of ng-template scripts
2012-01-25refactor(directives): connect new compilerMisko Hevery
- turn everything into a directive
2012-01-23refactor(scope): separate controller from scopeVojta Jina
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-13refactor($autoScroll): rename to $anchorScroll and allow disabling auto ↵Vojta Jina
scrolling (links) Now, that we have autoscroll attribute on ng:include, there is no reason to disable the service completely, so $anchorScrollProvider.disableAutoScrolling() means it won't be scrolling when $location.hash() changes. And then, it's not $autoScroll at all, it actually scrolls to anchor when it's called, so I renamed it to $anchorScroll.
2012-01-12refactor(module): strict separation between module-config / app-runtimeMisko Hevery
2012-01-10feat(module): new module loaderMisko Hevery
2012-01-10fix(ng:repeat): support repeating over array with nullIgor Minar
typeof null == 'object', but it doesn't behave like an object because its properties can't be dereferenced, so we need to special-case it. Closes #702
2012-01-09fix($httpBackend): fix for jsonp requestsIgor Minar
2012-01-09fix($http): fix and cleanup $http and friendsIgor Minar
$http: - use promises internally - get rid of XhrFuture that was previously used internally - get rid of $browser.defer calls for async stuff (serving from cache), promises will take care of asynchronicity - fix transformation bugs (when caching requested + multiple request pending + error is returned) - get rid of native header parsing and instead just lazily parse the header string $httpBackend: - don't return raw/mock XMLHttpRequest object (we don't use it for anything anymore) - call the callback with response headers string mock $httpBackend: - unify response api for expect and when - call the callback with response headers string - changed the expect/when failure error message so that EXPECTED and GOT values are aligned Conflicts: src/service/http.js test/service/compilerSpec.js test/service/httpSpec.js
2012-01-07feat(ng:include): enable/disable scrolling through autoscroll attributeVojta Jina
2012-01-06style(widgetsSpec): ws, unused variables, etcIgor Minar
2012-01-06fix(ng:repeat): support repeating over array with nullIgor Minar
typeof null == 'object', but it doesn't behave like an object because its properties can't be dereferenced, so we need to special-case it. Closes #702
2011-11-30fix(ng:include): prevent race conditions by ignoring stale http callbacksIgor Minar
This fix is similar to what I've done in ng:view, if a new template has been requested before the callback for the previous template returned, ignore it. Otherwise weird race conditions happen and users might end up getting the content for the previous include rendered instead of the most recent one.
2011-11-30feat($http): add promise supportIgor Minar
quite messy, some tests are missing, contains an experimental jasmine DI support)
2011-11-30refactor(ng:view, ng:include): pass cache instance into $httpVojta Jina
Instead of doing all the stuff in these widgets (checking cache, etc..) we can rely on $http now...
2011-11-30fix(mock.$httpBackend): flush() even requests sent during callbacksVojta Jina
2011-11-30feat(mocks.$httpBackend): add $httpBackend mockVojta Jina
$httpBackend mock allows: - expecting (asserting) requests - stubbing (responding without asserting) Add empty $httpBackend service (currently just wrapper for $browser.xhr)
2011-11-30feat($http): new $http service, removing $xhr.*Vojta Jina
Features: - aborting requests - more flexible callbacks (per status code) - custom request headers (per request) - access to response headers - custom transform functions (both request, response) - caching - shortcut methods (get, head, post, put, delete, patch, jsonp) - exposing pendingCount() - setting timeout Breaks Renaming $xhr to $http Breaks Takes one parameter now - configuration object Breaks $xhr.cache removed - use configuration cache: true instead Breaks $xhr.error, $xhr.bulk removed Breaks Callback functions get parameters: response, status, headers Closes #38 Closes #80 Closes #180 Closes #299 Closes #342 Closes #395 Closes #413 Closes #414 Closes #507
2011-11-14refactor(injector): $injector is no longer a function.Misko Hevery
- $injector('abc') -> $injector.get('abc'); - $injector(fn) -> $injector.invoke(null, fn);
2011-11-14style(docs): make jslint happy - fix some warningsVojta Jina
2011-11-14refactor($service): removed almost all references to scope.$serviceMisko Hevery
- still need to remove from factory
2011-11-14refactor(services): migrate angular.service -> moduleMisko Hevery
2011-11-14refactor(injector): switch to injector 2.0 introduce modulesMisko Hevery
2011-11-14new(injector): new injector v2.0Misko Hevery
- not connected to keep the CL small
2011-11-14refactor(compiler) turn compiler into a serviceMisko Hevery
BREAK - remove angular.compile() since the compile method is now a service and needs to be injected
2011-11-14refactor(injector): turn scope into a serviceMisko Hevery
- 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-10-31style(widgets): fix typo in a spec commentIgor Minar
2011-10-26fix(ng:repeat) with array ignore properties not representing array elementsIgor Minar
Along the way I also changed the repeater impl to use for loop instead of for in loop. Iteration over objects is handled by creating an array of keys, which is sorted and this array then determines the order of iteration over an element. This makes repeating over objects deterministic and cross-browser compatible.
2011-10-26fix(ng:view): ignore stale xhr callbacksIgor Minar
A lot of badness happens when we don't ignore stale xhrs. These raceconditions are only apparent when user clicks through the app very quckly without waiting for routes to fully load. Closes #619
2011-10-26test(ng:view): spec cleanupIgor Minar
- remove optional controller definition from specs - remove extranious digest calls
2011-10-18fix(ng:repeat): repeater should ignore $ and $$ propertiesIgor Minar
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11feat(ng:repeat) collection items and DOM elements affinity / stabilityMisko Hevery
2011-09-16fix(specs): jQuery now returns attr name instead of true/false for special attrsIgor Minar
for special attrs like 'checked' or 'multiple', jquery now returns the name or undedefined. e.g. foo.attr('checked') => 'checked' || undefined The solution is a combination of updating our tests as well as switching over to prop() instead which properly returns true/false
2011-09-08fix($route): update $route to reflect $location changesVojta Jina
* update $route to reflect new $location * add some more unit tests to $route * fix some other failing unit tests * redirect overrides the url now Breaks $route custom redirect fn has only 3 params now
2011-09-08feat($browser): jQuery style url method, onUrlChange eventVojta Jina
This is just basic implementation of $browser.url, $browser.onUrlChange methods: $browser.url() - returns current location.href $browser.url('/new') - set url to /new If supported, history.pushState is used, location.href property otherwise. $browser.url('/new', true) - replace current url with /new If supported, history.replaceState is used, location.replace otherwise. $browser.onUrlChange is only fired when url is changed from the browser: - user types into address bar - user clicks on back/forward button - user clicks on link It's not fired when url is changed using $browser.url() Breaks Removed $browser.setUrl(), $browser.getUrl(), use $browser.url() Breaks Removed $browser.onHashChange(), use $browser.onUrlChange()
2011-09-07fix(ng:options): ng:change should be called after the new val is setIgor Minar
Closes #547
2011-08-30feat(widget): add ng:pluralize as an Angular widgetDi Peng