Commit Graph

65 Commits

Author SHA1 Message Date
49527ab495 fix(ngFor): give more instructive error when binding to non-iterable
Before, you'd get an error like:

```
EXCEPTION: Cannot find a differ supporting object ‘[object Object]’ in [users in UsersCmp@2:14]
```

Now, you get:

```
EXCEPTION: Cannot find a differ supporting object ‘[object Object]’ of type 'Object'. Did you mean to bind ngFor to an Array? in [users in UsersCmp@2:14]
```
2016-03-24 15:21:16 +00:00
d4e9b55fb6 fix: make sure that Zone does not show up in angular2.d.ts
Closes #7655
2016-03-18 19:41:30 +00:00
2b165944ea refactor(i18n): move message and id into a separate file 2016-03-17 16:45:15 -07:00
310620fd12 chore: upgrade to new Zone.js API v0.6.2
BREAKING CHANGE

Removed deprecated API from NgZone
- `NgZone.overrideOnTurnStart`
- `NgZone.overrideOnTurnDone`
- `NgZone.overrideOnEventDone`
- `NgZone.overrideOnErrorHandler`

Rename NgZone API
- `NgZone.onTurnStart` => `NgZone.onUnstable`
- `NgZone.onTurnDone` => `NgZone.onMicrotaskEmpty`
- `NgZone.onEventDone` => `NgZone.onStable`

Closes #7345
2016-03-16 18:05:09 +00:00
b72bab49aa feat(core): introduce a CSS lexer/parser 2016-03-11 13:54:01 -08:00
b691da26af chore(facade): add enum index lookup support 2016-03-09 21:30:03 -08:00
b5e6319fa9 feat(core): add more debug APIs to inspect the application form a browser
Adds `window.getAllAngularRootElements()`
Adds `ng.coreTokens.ApplicationRef`
Adds `ng.coreTokens.Ngzone`

Closes #7045
Closes #7161
2016-03-01 16:01:28 +00:00
50548fb565 fix(forms): use strict runtimeType checks instead of instanceof
Currently, validators extending built-in validators are treated as built-in.
This can result in an error when both a real built-in validator and a custom one are applied to the same element.

Closes #6981
2016-02-10 09:23:59 -08:00
2a70f4e4c7 fix(typings): Don't expose typing dependencies to users.
This resolves Duplicate Identifier issues seen by many users,
at the expense of more typings installation required in some
cases.

Removes the quickstart hack of placing all needed dependencies
typings files in our distribution. Removes dependencies on
nodejs from angular2/core.

Fixes #5973
Fixes #5807
Fixes #6266

Angular now depends on es6-promise and es6-collections
(and a handful of manual typings) rather than all of es6-shim.

Fixes #5242

We previously had an undocumented breaking change, this is now
documented in this commit.

Fixes #6817

BREAKING CHANGE:

Transitive typings are no longer included in the distribution.
You may need to install typings in your project using
http://github.com/typings/typings

Users now must rely on getting typings from:
- one of the peerDependencies, such as rxjs, which exposes
  typings via the moduleResolution=node mechanism.
  (see https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages)
  This happens automatically.
- Using --target ES5 now requires manual installation of
  es6-promise and es6-collections typings.
- Using some angular APIs may introduce a dependency on eg. nodejs
  or jasmine, and those typings need manual installation as well.

Closes #6267
2016-02-04 22:42:40 +00:00
42231f5719 feat(change_detection): allow all legal programs in the dev mode
BEFORE:

The following would throw in the dev mode because `f` would return a new array when called by checkNoChanges.

@Component({
  template: `
    {{f()}}
  `
})
class A {
  f() { return [1]; }
}

AFTER:

The checkNoChanges function compares only primitives types for equality, and deeply compares iterables. Other objects cannot cause checkNoChanges to throw. This means that the dev mode would never fail given a legal program, but may allow some illegal programs.
2016-01-26 21:01:19 -08:00
7ae23adaff feat(core): speed up view creation via code gen for view factories.
BREAKING CHANGE:
- Platform pipes can only contain types and arrays of types,
  but no bindings any more.
- When using transformers, platform pipes need to be specified explicitly
  in the pubspec.yaml via the new config option
  `platform_pipes`.
- `Compiler.compileInHost` now returns a `HostViewFactoryRef`
- Component view is not yet created when component constructor is called.
  -> use `onInit` lifecycle callback to access the view of a component
- `ViewRef#setLocal` has been moved to new type `EmbeddedViewRef`
- `internalView` is gone, use `EmbeddedViewRef.rootNodes` to access
  the root nodes of an embedded view
- `renderer.setElementProperty`, `..setElementStyle`, `..setElementAttribute` now
  take a native element instead of an ElementRef
- `Renderer` interface now operates on plain native nodes,
  instead of `RenderElementRef`s or `RenderViewRef`s

Closes #5993
2016-01-05 08:56:46 -08:00
3dca9d522a feat(core): enable dev mode by default
BREAKING CHANGE

Before

Previously Angular would run in dev prod mode by default, and you could enable the dev mode by calling enableDevMode.

After

Now, Angular runs in the dev mode by default, and you can enable the prod mode by calling enableProdMode.
2015-12-15 08:34:44 -08:00
80a5e47e61 docs(*): Document a lot more symbols that are missing comments in our generated docs. 2015-12-15 03:04:48 +00:00
28860d35b2 feat(core): provide support for relative assets for components
Assets defined for `templateUrl` and `styleUrls` can now be loaded
in relative to where the component file is placed so long as the
`moduleId` is set within the component annotation.

Closes #5634
2015-12-09 16:28:49 -08:00
5f0ce30ee6 revert: feat(core): provide support for relative assets for components 2015-12-09 16:26:42 -08:00
db096a5e22 feat(core): provide support for relative assets for components
Assets defined for `templateUrl` and `styleUrls` can now be loaded
in relative to where the component file is placed so long as the
`moduleId` is set within the component annotation.

Closes #5634

Closes #5634
2015-12-09 22:04:00 +00:00
fb16c39496 chore(build): fix flakiness of the element probe global test 2015-12-02 14:19:07 -08:00
019cb41dd8 fix(EventEmitter): resolve onError and onComplete asynchronously
closes #4443
2015-11-24 16:54:13 -08:00
79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00
38a5a2a955 chore: move core modules into core directory
BREAKING CHANGE:
    This change moves the http module into angular2/, so its import
    path is now angular2/http instead of http/http.

    Many other modules have also been moved around inside of angular2,
    but the public API paths have not changed as of this commit.
2015-08-25 15:33:22 -07:00
b986c54079 chore: remove int in favor for number
Closes #3511
2015-08-21 05:10:31 +00:00
b7837389d7 refactor: Remove isDart from public API
BREAKING CHANGE:

- `IS_DARTIUM` no longer exported
2015-08-13 21:18:31 +00:00
dad9338c82 docs(type): Export Type so that we can link to it in our docs.
Closes #3345
2015-07-31 20:40:33 +00:00
3c58878b19 chore(build): Upgrade to TypeScript@1.5.3
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.

We should probably add a travis build for 1.6 so we stay compatible
with both versions.
2015-07-31 20:01:27 +00:00
73b7d99dc4 fix(style_url_resolver): fix data: url resolution 2015-07-29 11:24:17 -07:00
8543c347a8 feat(core): provide an error context when an exception happens in an error handler 2015-07-28 14:22:15 -07:00
771c0170d9 feat(web-workers) Add WebWorker Renderer
Allows angular apps to be rendered from the webworker!
Closes #3052, #3053, and #3097
2015-07-23 18:29:10 -07:00
8ecb632d70 feat(lang): added "context" to BaseException 2015-07-22 14:21:44 -07:00
de18da2a0d feat(build): require parameter types
Fixes #2833
2015-07-21 06:20:13 -07:00
b2a0be87e8 fix(change_detect): Sort DirectiveMetadata properties during processing
The Angular 2 render compiler can get out of sync between its transformer
execution and its runtime execution, leading to incorrect change detectors with
out-of-order property values. Stable sorting solves this problem (temporarily).
2015-07-20 17:08:02 -07:00
ccb41632c7 feat(facade): add getTypeNameForDebugging function 2015-07-15 10:28:25 -07:00
81abc39929 feat(http): add support for JSONP requests
Closes #2905
Closes #2818
2015-07-14 21:31:05 -04:00
b716046b97 feat(pipes): add date pipe
Closes #2877
2015-07-09 15:00:14 -07:00
3143d188ae feat(pipes): add number (decimal, percent, currency) pipes 2015-07-09 14:59:57 -07:00
55bf0e554f feat(http): refactor library to work in dart
Mostly internal refactoring needed to make ts2dart and DartAnalyzer happy.

Fixes #2415
2015-06-30 15:21:36 -07:00
44891996b5 fix(build): add missing return types now enforced by linter 2015-06-29 15:31:41 -07:00
56245c6aa2 feat(lang): added originalException and originalStack to BaseException 2015-06-29 11:16:12 -07:00
920982c4e8 chore: update files to match clang-format 1.0.21. 2015-06-19 15:00:32 -07:00
cdfb635737 refactor(facade): refactor type check function - is*() 2015-06-16 19:27:34 +02:00
a46df6f829 refactor(StringWrapper): add missing types 2015-06-15 19:35:16 +02:00
a6e7123995 feat: adjust formatting for clang-format v1.0.19. 2015-06-12 09:51:57 -07:00
331a051e75 feat(Parser): implement Unparser
fixes #1949
closes #2395
2015-06-10 16:24:59 -07:00
548f3dd5cc feat(facade): add isMap method 2015-06-08 15:49:56 -07:00
8d081ea7af fix: include error message in the stack trace 2015-06-05 16:22:41 -07:00
c2fa4b7191 docs(chore): missing reformats to make clang-format 1.0.15 2015-06-02 15:30:04 -07:00
dc060e8b64 docs(clang): format updates 2015-06-02 15:30:03 -07:00
1d24e2cf23 fix(Global && src/facade && Protractor): Allows List to be imported.
Allows the List type to be imported from 'angular2/src/facade/collection'
2015-06-02 13:11:31 -07:00
e323c07ab9 refactor(benchpress): convert src and test to typescript
Fixes #2007
2015-05-29 14:02:58 -07:00
c39c8ebcd0 feat(change_detection): added onInit and onCheck hooks 2015-05-28 16:46:22 -07:00
01fb8e6635 fix: fix clang errors 2015-05-28 11:08:26 -07:00