Commit Graph

3028 Commits

Author SHA1 Message Date
Misko Hevery d896e4350a feat(ngUpgrade): add support for upgrade/downgrade of injectables
Closes #4766
2015-10-15 20:28:28 +00:00
Misko Hevery 486c1eda8e docs(ngUpgrade): document public methods 2015-10-15 20:28:28 +00:00
Misko Hevery 053b7a50e1 feat(ngUpgrade): faster ng2->ng1 adapter by only compiling ng1 once
The adapter only compiles ng1 template. This means that we need to 
reimplement / emulate all of the ng1’s API on the HOST element.


interface IDirective {
  compile?: IDirectiveCompileFn;               // NOT SUPPORTED
  controller?: any;                            // IMPLEMENTED
  controllerAs?: string;                       // IMPLEMENTED
  bindToController?: boolean|Object;           // IMPLEMENTED
  link?: IDirectiveLinkFn | IDirectivePrePost; // IMPLEMENTED (pre-link only)
  name?: string;                               // N/A
  priority?: number;                           // NOT SUPPORTED
  replace?: boolean;                           // NOT SUPPORTED
  require?: any;                               // IMPLEMENTED
  restrict?: string;                           // WORKING
  scope?: any;                                 // IMPLEMENTED
  template?: any;                              // IMPLEMENTED
  templateUrl?: any;                           // IMPLEMENTED
  terminal?: boolean;                          // NOT SUPPORTED
  transclude?: any;                            // IMPLEMENTED
}
2015-10-15 20:28:28 +00:00
Misko Hevery 059e8faae2 refactor(ngUpgrade): renames and docs
BREAKING CHANGE:

- Changes the terminology to Adapter and upgrade/downgrade
- Removes the Module from the public API to prevent confusion
2015-10-15 20:28:28 +00:00
Julie Ralph d7ab5d44a5 fix(testing): let DOM adapter dictate XHR implementation for tests
The test injector now uses an XHR implementation based on DOM.getXHR,
which allows the current DOM adapter to dictate which XHR impl should
be used.

To prevent the changes to DOM adapter from introducing undesired new
dependencies into the benchmarks, separate the async facade into
a promise facade which is reexported by facade/async.

See #4539
2015-10-15 12:12:27 -07:00
vsavkin 65c737fc95 feat(forms): add input[type=number] value accessor
Closes #4014

Closes #4761
2015-10-15 18:41:17 +00:00
Marc Laval 427860a5bd chore(saucelabs): add Edge
Closes #4758
2015-10-15 18:20:41 +00:00
Tobias Bosch a941fb08f7 fix(style_compiler): don’t resolve absolute urls that start with a `/` during compilation
Closes #4763
2015-10-15 11:13:52 -07:00
Tobias Bosch cec8b58373 fix(compiler): explicitly support event bindings also on `<template>` elements
Although these events don’t fire events themselves, there might be directives on them that fire events.

Closes #4712
2015-10-15 10:08:22 -07:00
Marc Laval b89c5bc581 fix(compiler): attribute case in IE9
Closes #4743
2015-10-15 10:18:15 +02:00
Tobias Bosch 7dde18b181 fix(style_compiler): don’t touch urls in stylesheets and keep stylesheets with absolute urls in templates
We can’t resolve relative urls (e.g. for images) in the compiler as
these urls are meant to be loaded in the browser
(unless we would inline images as base64…).

Also, keep `<link rel=“stylesheet”>` in templates that
reference absolute urls with e.g. `http://`. This
behavior was already present for `@import` rules
within stylesheets.
Closes #4740
2015-10-15 01:42:48 +00:00
Kevin Moore 2be9fef86d chore(travis): reenable lasted Dart dev channel build
Closes https://github.com/angular/angular/issues/4467

Closes #4745
2015-10-15 00:19:31 +00:00
Kevin Moore a91ae291e4 fix(test) fix Dart annotation for integration_dart_spec.dart 2015-10-15 00:19:31 +00:00
vsavkin b716d2335b fix(forms): emit value changes after errors and status are set
Closes #4714
2015-10-14 19:36:43 +00:00
Tobias Bosch 6436f96fd1 fix(transformers): show nice error message when an invalid uri is found
Closes #4731
2015-10-14 10:20:29 -07:00
Tim Blasi efddc9069c fix(dart/transform): Parse directives agnostic of annotation order
Now that we can specify `directives` in either `@View` or `@Component`,
we will try to parse from both.

Previously, we would trash any `directives` parsed in the first
annotation upon encountering the second annotation. This ensures that we
maintain that list of `directives` regardless of annotation ordering.
2015-10-14 10:17:14 -07:00
Alex Eagle f5159389b3 chore(changelog): document the breaking change of including typings 2015-10-14 09:43:04 -07:00
Tim Blasi 5a505975bf fix(dart/transform): Handle empty .ng_deps.dart files
Handle the situation where a `.dart` file generates a `.ng_meta.json`
file but does not register any reflective information.

An example of this would be a file that defines a const list that looks
like a directive alias. The transformer keeps track of this, and creates
a `.ng_meta.json` file but never creates a `.ng_deps.dart` file, which
can result in other files being linked to it and it not defining an
`initReflector` method.
2015-10-14 01:34:55 +00:00
Tim Blasi 115ad4d062 refactor(dart/transform): Allow inlining only using `inline_views`
Remove the `inliner_for_test` standalone transformer and make inlining
available via the `inline_views` parameter to the main angular2
transformer.
2015-10-13 18:06:59 -07:00
vsavkin bfbf18d983 feat(query): add filter and reduce to QueryList
Closes #4710
2015-10-13 23:52:17 +00:00
Jeff Cross 9fc24b9c52 chore(changelog): update changelog to alpha.42 2015-10-13 16:04:27 -07:00
Jeff Cross 247479d017 chore(release): bump angular version to alpha.42 2015-10-13 15:58:13 -07:00
Jeff Cross 57649d1839 fix(publish): emit type declarations with CJS build
Closes #4706
Closes #4708
2015-10-13 22:17:12 +00:00
vsavkin e82a35d1fd feat(forms): add minlength and maxlength validators
Closes #4705
2015-10-13 21:42:12 +00:00
vsavkin 50e922f37b feat(build): add tasks to watch and recompile js and dart 2015-10-13 21:42:12 +00:00
Jason Teplitz 3b036601cc fix(build): Fix serve.js.dev to build bundles
Closes #4700
2015-10-13 21:04:10 +00:00
Marc Laval e15e2428c5 fix(test): command compiler attr merge test in IE 2015-10-13 13:39:32 -07:00
Alex Rickabaugh 3a801c16fa fix(docs): minor @link fixes.
Closes #4696
2015-10-13 20:24:55 +00:00
Igor Minar 717bd23c37 docs(changelog): add a note about how we changed the d.ts file distribution 2015-10-13 13:02:30 -07:00
Igor Minar d02b794af2 chore(changelog): update changelog to alpha.41 2015-10-13 12:52:33 -07:00
Igor Minar bb9d299b38 chore(release): bump angular version to alpha.41 2015-10-13 12:28:03 -07:00
Matias Niemelä 1bc35208df test(router): add testing code for querystring serialization 2015-10-13 12:06:22 -07:00
Matias Niemelä ea661fa10f chore(examples): extend inbox example code to include sorting 2015-10-13 12:06:22 -07:00
Brian Ford c0b7bae9d3 test(router): add missing tests for the url parser 2015-10-13 12:06:22 -07:00
Brian Ford 8bc40d3f4d fix(router): properly read and serialize query params
This splits out `path` and `query` into separate params for `location.go`
and related methods so that we can handle them properly in both `PathLocationStrategy`
and `HashLocationStrategy`.

This handles the problem of not reading query params to populate `Location` on the
initial page load.

Closes #3957
Closes #4225
Closes #3784
2015-10-13 12:06:22 -07:00
Brian Ford 440fd11c72 feat(facade): add fromISODate method 2015-10-13 12:06:22 -07:00
Julie Ralph f529236bfc refactor(test): rename test_lib to testing
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00
Pawel Kozlowski 5a504e6b78 chore(bundles): use proper bundle arithmetic for all http bundles
Closes #4699
2015-10-13 15:28:33 +00:00
Julie Ralph a1fa2e472f feat(test): Add an external version of the test library
Adds test adapters for TypeScript and JavaScript only, exported
as part of the test_lib module. These work with the Jasmine test
framework, and allow use of the test injector within test blocks
via the `inject` function.

See #4572, #4177, #4035, #2783

This includes the TestComponentBuilder. It allows using the
test injector with Jasmine bindings, and waits for returned
promises before completing async test blocks.
2015-10-12 23:14:03 -07:00
Sam Rawlins eb2c15786e refactor: Update multiple ctors warning with a space and grammar
Add a space before the word "using" and make spelling of
constructor/ctor consistent

Closes #3923
2015-10-13 02:35:43 +00:00
Alex Eagle 947bf11cb6 chore(docs): copy [Decorator]Metadata docs to the [Decorator]
This allows editors to show the docs when users navigate to definition.

See #4668

Closes #4683
2015-10-13 00:30:24 +00:00
vsavkin 1aeafd31bd feat(di): change the params of Provider and provide to start with "use"
Closes #4684
2015-10-12 21:09:09 +00:00
Pawel Kozlowski f443ecbfa6 refactor(router): use compiler's public API in imports
Closes #4662
2015-10-12 20:14:22 +00:00
Pawel Kozlowski 8667b760f4 refactor(router): use DI imports from public API
This allows us to create smaller CJS bundles for router,
where the bundle doesn't duplicate code from angular2 core.
2015-10-12 20:14:22 +00:00
Igor Minar 6abed8d996 fix(test_lib): don't mock out XHR via MockXHR by default in tests
This is useful for the compiler tests, but otherwise it's not useful.

Additionally if an application has external templates (as is common) then
we should actually fetch these templates in tests.

Fixes #4539

Closes #4682
2015-10-12 17:45:19 +00:00
Tobias Bosch eacc8e3803 fix(compiler): merge `class` and `style` attributes from the element with the host attributes
Closes #4583
Closes #4680
2015-10-12 15:35:49 +00:00
Igor Minar da1272f368 build(analytics): add basic build-analytics to the project
This is pretty experimental, but the goal is to track the performance
of our build over time so that we can more easily track perf regressions.

Currently it's integrated only with gulp tasks, but I'd like to expand it
to tracking travis jobs, protractor/benchpress test runs, npm installs, etc.

No PII is being collected. And the data is collected via a Google Analytics
property owned by the Angular team account.

Closes #4672
2015-10-12 03:50:00 +00:00
Marc Laval 0def28e594 fix(compiler): shadow CSS @import test in some browsers
Closes #4629
2015-10-12 00:28:07 +02:00
Alex Eagle b96784756c chore(docs): remove @View decorator from examples in docs
Closes #4666
2015-10-11 22:02:38 +00:00
vsavkin 62005dd127 docs(core): fix links in core docs 2015-10-11 14:42:36 -07:00