5089 Commits

Author SHA1 Message Date
Tobias Bosch
a32c4ad2f0 fix(compiler): auto declare entryComponents recursively
Closes 
2016-07-28 12:03:34 -07:00
Tobias Bosch
fb3608aa5d fix(compiler): report better error messages for host bindings
Closes 
2016-07-28 11:21:50 -07:00
Alex Eagle
0a46f37444 fix(metadata): fix typechecking with typescript@next 2016-07-28 11:17:53 -07:00
Tobias Bosch
9b39e499ac fix(core): support components without a selector ()
Components without a selector now get the selector `ng-component`.
Directives without a selector will throw an error message.

Closes 
Closes 
2016-07-28 10:39:10 -07:00
Hans
a67cc8229d chore: move injector to being non-internal but private ()
* chore: move injector to being non-internal but private

* Add the new non-internal method to the public API.
2016-07-28 10:38:29 -07:00
Chuck Jazdzewski
b58e9ea775 feat(compiler): Added support for references to static fields. ()
Closes: 
2016-07-27 19:26:59 -07:00
Rob Wormald
422effdd18 refactor(http): use ngModules for http () 2016-07-27 13:09:05 -07:00
vikerman
3b690b68a6 fix(testing): Fix error message in test bed
The API name in the error message was wrong
2016-07-27 12:03:27 -07:00
Kara
43349dd373 fix(forms): improve ngModel error messages () 2016-07-27 10:59:40 -07:00
Tobias Bosch
e44e8668ea fix(core): only warn and auto declare undeclared entryComponents.
This is needed to support existing applications.
After final these warnings will become errors.

Closes 
2016-07-27 10:56:12 -07:00
Tobias Bosch
69e72c0786 chore: remove browserDynamicTestingPlatform as it is deprecated and was not part of rc.4
Closes 
2016-07-27 10:52:47 -07:00
Tobias Bosch
553344739c fix(core): allow module providers to overwrite providers from ModuleWithProviders
Fixes 
Closes 
2016-07-27 10:51:58 -07:00
Tobias Bosch
367f0fd142 fix(static_reflector): report methods with decorators in propMetadata as well
This was the behavior of our regular reflector as well, although the
method name does not imply this.

Fixes 
Closes 
2016-07-27 10:50:58 -07:00
Gabe Johnson
58d9e7fc5a feat(facade): add support for all thenables ()
All objects that have a then function will be considered Promises
2016-07-27 10:37:48 -07:00
vsavkin
9d9e9c6ff1 refactor(router): take advantage of the new way of configuring modules 2016-07-27 10:24:29 -07:00
Matias Niemelä
ba88db5141 fix(ngClass): do not deconstruct classes on element removal ()
Prior to this fix [ngClass] would remove all dynamic classes
when destroyed. It's essential that classes are persisted such
that remove-based animations will still be stylistically correct.
This patch fixes this issue.

Closes 
Closes 
2016-07-26 15:20:27 -07:00
vsavkin
62e7c0f464 feat(router): implement canLoad 2016-07-26 14:39:02 -07:00
Tobias Bosch
fc83bbbe98 fix(compiler): treat custom elements as unknown elements by default
Closes 
2016-07-26 12:31:22 -07:00
Martin Probst
482c019199 feat(security): only warn when actually sanitizing HTML. ()
Previously, Angular would warn users when simply re-encoding text
outside of the ASCII range. While harmless, the log spam was annoying.

With this change, Angular specifically tracks whether anything was
stripped during sanitization, and only reports a warning if so.

Fixes .
2016-07-26 11:39:09 -07:00
Chuck Jazdzewski
b449467940 feat(compiler): Allow calls to simple static methods ()
Closes: 
2016-07-26 10:18:35 -07:00
Kara
0aba42ae5b fix(forms): throw error if wrong control container for reactive forms () 2016-07-26 10:08:46 -07:00
Matias Niemelä
0d1bf8148b fix(animations): ensure animation detection doesn't rely on the body node
Closes 
Closes 
Closes 
2016-07-26 09:33:50 -07:00
Tobias Bosch
b42411ba1f chore: update public api
- `precompile` -> `entryComponents`
- introduce `ModuleWithProviders`
- introduce `@NgModule.schema`
- update to bootstrap

Closes 
2016-07-26 07:45:40 -07:00
Tobias Bosch
5a21f168d6 refactor(core): change bootstrap of modules and names of platforms
BREAKING CHANGES:
- `browserPlatform`/`browserDynamicPlatform`/... have been deprecated and renamed into `platformBrowser`/`platformBrowserDynamic`/....
- `bootstrapModule` and `bootstrapModuleFactory` have been moved to be members of `PlaformRef`.
  E.g. `platformBrowserDynamic().bootstrapModule(MyModule)`.
2016-07-26 07:28:55 -07:00
Tobias Bosch
00b726f695 refactor(core): introduce NgModule.schemas
This allows Angular to error on unknown properties,
allowing applications that don’t use custom elements
to get better error reporting.

Part of 

BREAKING CHANGE:
- By default, Angular will error during parsing
  on unknown properties,
  even if they are on elements with a `-` in their name
  (aka custom elements). If you application is using
  custom elements, fill the new parameter `@NgModule.schemas`
  with the value `[CUSTOM_ELEMENTS_SCHEMA]`.

  E.g. for bootstrap:
  ```
  bootstrap(MyComponent, {schemas: [CUSTOM_ELEMENTS_SCHEMA]});
  ```
2016-07-26 07:04:36 -07:00
Tobias Bosch
f02da4e91a feat(core): introduce ModuleWithProviders.
Modules can now provider helper functions that allow
to import a module together with an array of providers.

Part of 
2016-07-26 07:04:36 -07:00
Tobias Bosch
d6b65db9a7 fix(static_reflector): resolve values of functions in the function context 2016-07-26 07:04:36 -07:00
Tobias Bosch
6f4e49ed53 refactor(core): rename precompile into entryComponents.
Part of 

BREAKING CHANGE:
- `@Component.precompile` was renamed to `@Component.entryComponents`
  (old property still works but is deprecated)
- `ANALYZE_FOR_PRECOMPILE` was renamed to `ANALYZE_FOR_ENTRY_COMPONENTS` (no deprecations)
2016-07-26 07:04:36 -07:00
Tobias Bosch
46b212706b refactor(core): change module semantics
This contains major changes to the compiler, bootstrap of the platforms
and test environment initialization.

Main part of 
Closes 

BREAKING CHANGE:
- Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit.
  This is actually not breaking as `@AppModules` were not part of rc.4.
  We will have detailed docs on `@NgModule` separately.
- `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support).
  Use `bootstrapModule` / `bootstrapModuleFactory` instead.
- All Components listed in routes have to be part of the `declarations` of an NgModule.
  Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
2016-07-26 07:04:10 -07:00
mlaval
ca16fc29a6 build: fix and document the symlinks scripts for Windows
Closes 
2016-07-26 09:52:11 +02:00
Sammy Jelin
9edea0b139 fix(ng upgrade): do not compile ng2 components until after ng1 bootstrap ()
Closes  and 
2016-07-25 21:14:35 -07:00
vsavkin
d15a1d64e1 fix(router): make router provides work with cli and offline compilation 2016-07-25 18:04:22 -07:00
Kara
c87847974a chore(forms): separate out tests for reactive forms () 2016-07-25 15:57:51 -07:00
vsavkin
6f68330fa5 feat(router): rename UrlPathWithParams into UrlSegment
BREAKING CHANGE:

UrlPathWithParams => UrlSegment
UrlSegment => UrlSegmentGroup
2016-07-25 12:15:07 -07:00
vsavkin
2b63330a36 fix(router): handle when both primary and secondary are empty-path and primary has a child 2016-07-22 18:51:35 -07:00
vsavkin
06e4ca4bb3 fix(router): advance query params and fragment after advanced routes 2016-07-22 18:51:35 -07:00
vsavkin
43437c175a fix(router): handle url fragments when no url segments present 2016-07-22 18:51:35 -07:00
vsavkin
8d90a5a4cf fix(router): router link active should take all descendants into account 2016-07-22 18:51:35 -07:00
vsavkin
93a4ca652a refactor(router): renames PRIMARY_OUTLET into primary 2016-07-22 18:51:35 -07:00
Victor Berchet
41178367d1 feat(HtmlLexer): better hint on unclosed ICU message errors
fixes 
2016-07-22 17:27:15 -07:00
Victor Berchet
54f2edbb90 refactor(Lexer): code cleanup 2016-07-22 16:50:54 -07:00
Victor Berchet
b652a7fc9f chore: remove obsolete files () 2016-07-22 16:18:31 -07:00
vikerman
e34eb4520f fix(testing): ComponentFixture - Avoid extra scheduleMicrotask ()
Don't schedule microtask to check for pending macrotasks when no one is waiting for a whenStable().
2016-07-22 16:07:11 -07:00
PatrickJS
190bcc89c1 refactor(EventEmitter): optional emits ()
the Subject#next is optional
2016-07-22 10:19:57 -07:00
Jason Choi
64fc4648b7 fix(testing): correctly import NgMatchers ()
Some test cases incorrectly rely on the side effect of other test cases
importing `NgMatchers`. This commit fixes this by making `expect` in
`core/testing_internal` properly typed.
2016-07-22 09:20:51 -07:00
Josh Gerdes
bdb59129d0 feat(http): add content-type override support for http request () 2016-07-22 08:37:32 -07:00
Victor Berchet
d455942389 fix(CurrencyPipe): use default Intl formatting options when none provided
fixes 
2016-07-22 08:21:31 -07:00
Victor Berchet
cdb3678fe3 chore(tools): remove unused files 2016-07-22 08:20:46 -07:00
Victor Berchet
e73ac1e992 chore(Dart): remove obsolete files, update the docs 2016-07-22 08:20:46 -07:00
Martin Probst
51f3d22e4f feat(security): trust resource URLs as URLs. ()
Resource URLs are strictly "more" trustworthy than plain URLs, so trusting them maintains the same level of security while avoiding to break people when we downgrade a resource URL context to a plain URL context.
2016-07-21 17:44:59 -07:00