-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forms): add easy way to switch between forms modules (#9202)
- Loading branch information
1 parent
fe01e2e
commit 22916bb
Showing
75 changed files
with
3,570 additions
and
583 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
modules/@angular/core/src/platform_directives_and_pipes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import {OpaqueToken} from './di'; | ||
|
||
/** | ||
A token that can be provided when bootstrapping an application to make an array of directives | ||
* available in every component of the application. | ||
* | ||
* ### Example | ||
* | ||
* ```typescript | ||
* import {PLATFORM_DIRECTIVES} from '@angular/core'; | ||
* import {OtherDirective} from './myDirectives'; | ||
* | ||
* @Component({ | ||
* selector: 'my-component', | ||
* template: ` | ||
* <!-- can use other directive even though the component does not list it in `directives` --> | ||
* <other-directive></other-directive> | ||
* ` | ||
* }) | ||
* export class MyComponent { | ||
* ... | ||
* } | ||
* | ||
* bootstrap(MyComponent, [{provide: PLATFORM_DIRECTIVES, useValue: [OtherDirective], | ||
multi:true}]); | ||
* ``` | ||
* @stable | ||
*/ | ||
|
||
export const PLATFORM_DIRECTIVES: OpaqueToken = | ||
/*@ts2dart_const*/ new OpaqueToken('Platform Directives'); | ||
|
||
/** | ||
* A token that can be provided when bootstraping an application to make an array of pipes | ||
* available in every component of the application. | ||
* | ||
* ### Example | ||
* | ||
* ```typescript | ||
* import {PLATFORM_PIPES} from '@angular/core'; | ||
* import {OtherPipe} from './myPipe'; | ||
* | ||
* @Component({ | ||
* selector: 'my-component', | ||
* template: ` | ||
* {{123 | other-pipe}} | ||
* ` | ||
* }) | ||
* export class MyComponent { | ||
* ... | ||
* } | ||
* | ||
* bootstrap(MyComponent, [{provide: PLATFORM_PIPES, useValue: [OtherPipe], multi:true}]); | ||
* ``` | ||
* @stable | ||
*/ | ||
|
||
export const PLATFORM_PIPES: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken('Platform Pipes'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'index.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './src/forms'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@angular/forms", | ||
"version": "0.0.0-PLACEHOLDER", | ||
"description": "", | ||
"main": "index.js", | ||
"jsnext:main": "esm/index.js", | ||
"typings": "index.d.ts", | ||
"author": "angular", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@angular/core": "0.0.0-PLACEHOLDER", | ||
"@angular/common": "0.0.0-PLACEHOLDER", | ||
"@angular/compiler": "0.0.0-PLACEHOLDER" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/angular/angular.git" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
export default { | ||
entry: '../../../dist/packages-dist/forms/esm/index.js', | ||
dest: '../../../dist/packages-dist/forms/esm/forms.umd.js', | ||
format: 'umd', | ||
moduleName: 'ng.forms', | ||
globals: { | ||
'@angular/core': 'ng.core', | ||
'@angular/common': 'ng.common', | ||
'@angular/compiler': 'ng.compiler', | ||
'rxjs/Subject': 'Rx', | ||
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update. | ||
'rxjs/operator/toPromise': 'Rx.Observable.prototype', | ||
'rxjs/Observable': 'Rx' | ||
}, | ||
plugins: [ | ||
// nodeResolve({ jsnext: true, main: true }), | ||
] | ||
} |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
.../directives/abstract_control_directive.ts → .../directives/abstract_control_directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...orms/directives/default_value_accessor.ts → .../src/directives/default_value_accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...common/src/forms/directives/ng_control.ts → ...ngular/forms/src/directives/ng_control.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...src/forms/directives/ng_control_status.ts → ...forms/src/directives/ng_control_status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ar/common/src/forms/directives/ng_form.ts → .../@angular/forms/src/directives/ng_form.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...r/common/src/forms/directives/ng_model.ts → ...@angular/forms/src/directives/ng_model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...forms/directives/number_value_accessor.ts → ...s/src/directives/number_value_accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...irectives/radio_control_value_accessor.ts → ...irectives/radio_control_value_accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tive_directives/form_control_directive.ts → ...tive_directives/form_control_directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../reactive_directives/form_control_name.ts → .../reactive_directives/form_control_name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...active_directives/form_group_directive.ts → ...active_directives/form_group_directive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...rectives/select_control_value_accessor.ts → ...rectives/select_control_value_accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...select_multiple_control_value_accessor.ts → ...select_multiple_control_value_accessor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...lar/common/src/forms/directives/shared.ts → ...s/@angular/forms/src/directives/shared.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...common/src/forms/directives/validators.ts → ...ngular/forms/src/directives/validators.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.