| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d2527b5 commit a02614b
99 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,6 +17,5 @@ export {ROUTER_PROVIDERS} from './src/alt_router/router_providers'; | |||
| 17 | 17 | ||
| 18 | 18 | import {RouterOutlet} from './src/alt_router/directives/router_outlet'; | |
| 19 | 19 | import {RouterLink} from './src/alt_router/directives/router_link'; | |
| 20 | - import {CONST_EXPR} from './src/facade/lang'; | ||
| 21 | 20 | ||
| 22 | - export const ROUTER_DIRECTIVES: any[] = CONST_EXPR([RouterOutlet, RouterLink]); | ||
| 21 | + export const ROUTER_DIRECTIVES: any[] = /*@ts2dart_const*/ [RouterOutlet, RouterLink]; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ export { | |||
| 13 | 13 | disableDebugTools | |
| 14 | 14 | } from 'angular2/src/platform/browser_common'; | |
| 15 | 15 | ||
| 16 | - import {Type, isPresent, isBlank, CONST_EXPR} from 'angular2/src/facade/lang'; | ||
| 16 | + import {Type, isPresent, isBlank} from 'angular2/src/facade/lang'; | ||
| 17 | 17 | import { | |
| 18 | 18 | BROWSER_PROVIDERS, | |
| 19 | 19 | BROWSER_APP_COMMON_PROVIDERS, | |
@@ -39,10 +39,10 @@ import {Provider} from 'angular2/src/core/di'; | |||
| 39 | 39 | /** | |
| 40 | 40 | * An array of providers that should be passed into `application()` when bootstrapping a component. | |
| 41 | 41 | */ | |
| 42 | - export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = CONST_EXPR([ | ||
| 42 | + export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/ [ | ||
| 43 | 43 | BROWSER_APP_COMMON_PROVIDERS, | |
| 44 | 44 | COMPILER_PROVIDERS, | |
| 45 | - new Provider(XHR, {useClass: XHRImpl}), | ||
| 45 | + new Provider(XHR, {useClass: XHRImpl}, | ||
| 46 | 46 | ]); | |
| 47 | 47 | ||
| 48 | 48 | export function browserPlatform(): PlatformRef { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ import { | |||
| 33 | 33 | * have been precompiled offline. | |
| 34 | 34 | */ | |
| 35 | 35 | export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 36 | - BROWSER_APP_COMMON_PROVIDERS; | ||
| 36 | + /*@ts2dart_const*/ BROWSER_APP_COMMON_PROVIDERS; | ||
| 37 | 37 | ||
| 38 | 38 | export function browserStaticPlatform(): PlatformRef { | |
| 39 | 39 | if (isBlank(getPlatform())) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,6 @@ import { | |||
| 3 | 3 | ADDITIONAL_TEST_BROWSER_PROVIDERS | |
| 4 | 4 | } from 'angular2/platform/testing/browser_static'; | |
| 5 | 5 | import {BROWSER_APP_PROVIDERS} from 'angular2/platform/browser'; | |
| 6 | - import {CONST_EXPR} from 'angular2/src/facade/lang'; | ||
| 7 | 6 | ||
| 8 | 7 | /** | |
| 9 | 8 | * Providers for using template cache to avoid actual XHR. | |
@@ -15,10 +14,10 @@ export {CACHED_TEMPLATE_PROVIDER} from 'angular2/platform/browser'; | |||
| 15 | 14 | * Default platform providers for testing. | |
| 16 | 15 | */ | |
| 17 | 16 | export const TEST_BROWSER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 18 | - CONST_EXPR([TEST_BROWSER_STATIC_PLATFORM_PROVIDERS]); | ||
| 17 | + /*@ts2dart_const*/[TEST_BROWSER_STATIC_PLATFORM_PROVIDERS]; | ||
| 19 | 18 | ||
| 20 | 19 | /** | |
| 21 | 20 | * Default application providers for testing. | |
| 22 | 21 | */ | |
| 23 | 22 | export const TEST_BROWSER_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 24 | - CONST_EXPR([BROWSER_APP_PROVIDERS, ADDITIONAL_TEST_BROWSER_PROVIDERS]); | ||
| 23 | + /*@ts2dart_const*/[BROWSER_APP_PROVIDERS, ADDITIONAL_TEST_BROWSER_PROVIDERS]; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ import {BrowserDetection} from 'angular2/src/testing/utils'; | |||
| 30 | 30 | ||
| 31 | 31 | import {ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/common_dom'; | |
| 32 | 32 | ||
| 33 | - import {CONST_EXPR, IS_DART} from 'angular2/src/facade/lang'; | ||
| 33 | + import {IS_DART} from 'angular2/src/facade/lang'; | ||
| 34 | 34 | ||
| 35 | 35 | import {Log} from 'angular2/src/testing/utils'; | |
| 36 | 36 | ||
@@ -47,14 +47,14 @@ function createNgZone(): NgZone { | |||
| 47 | 47 | * Default platform providers for testing without a compiler. | |
| 48 | 48 | */ | |
| 49 | 49 | export const TEST_BROWSER_STATIC_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 50 | - CONST_EXPR([ | ||
| 50 | + /*@ts2dart_const*/ [ | ||
| 51 | 51 | PLATFORM_COMMON_PROVIDERS, | |
| 52 | - new Provider(PLATFORM_INITIALIZER, {useValue: initBrowserTests, multi: true}) | ||
| 52 | + new Provider(PLATFORM_INITIALIZER, {useValue: initBrowserTests, multi: true} | ||
| 53 | 53 | ]); | |
| 54 | 54 | ||
| 55 | 55 | export const ADDITIONAL_TEST_BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 56 | - CONST_EXPR([ | ||
| 57 | - new Provider(APP_ID, {useValue: 'a'}), | ||
| 56 | + /*@ts2dart_const*/ [ | ||
| 57 | + new Provider(APP_ID, {useValue: 'a'}, | ||
| 58 | 58 | ELEMENT_PROBE_PROVIDERS, | |
| 59 | 59 | new Provider(DirectiveResolver, {useClass: MockDirectiveResolver}), | |
| 60 | 60 | new Provider(ViewResolver, {useClass: MockViewResolver}), | |
@@ -69,8 +69,8 @@ export const ADDITIONAL_TEST_BROWSER_PROVIDERS: Array<any /*Type | Provider | an | |||
| 69 | 69 | * Default application providers for testing without a compiler. | |
| 70 | 70 | */ | |
| 71 | 71 | export const TEST_BROWSER_STATIC_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 72 | - CONST_EXPR([ | ||
| 72 | + /*@ts2dart_const*/ [ | ||
| 73 | 73 | BROWSER_APP_COMMON_PROVIDERS, | |
| 74 | - new Provider(XHR, {useClass: XHRImpl}), | ||
| 74 | + new Provider(XHR, {useClass: XHRImpl}, | ||
| 75 | 75 | ADDITIONAL_TEST_BROWSER_PROVIDERS | |
| 76 | 76 | ]); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,6 @@ import { | |||
| 38 | 38 | import {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events'; | |
| 39 | 39 | import {LocationStrategy} from 'angular2/platform/common'; | |
| 40 | 40 | ||
| 41 | - import {CONST_EXPR} from 'angular2/src/facade/lang'; | ||
| 42 | 41 | ||
| 43 | 42 | import {Log} from 'angular2/src/testing/utils'; | |
| 44 | 43 | ||
@@ -50,10 +49,11 @@ function initServerTests() { | |||
| 50 | 49 | /** | |
| 51 | 50 | * Default platform providers for testing. | |
| 52 | 51 | */ | |
| 53 | - export const TEST_SERVER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = CONST_EXPR([ | ||
| 54 | - PLATFORM_COMMON_PROVIDERS, | ||
| 55 | - new Provider(PLATFORM_INITIALIZER, {useValue: initServerTests, multi: true}) | ||
| 56 | - ]); | ||
| 52 | + export const TEST_SERVER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | ||
| 53 | + /*@ts2dart_const*/ [ | ||
| 54 | + PLATFORM_COMMON_PROVIDERS, | ||
| 55 | + new Provider(PLATFORM_INITIALIZER, {useValue: initServerTests, multi: true} | ||
| 56 | + ]); | ||
| 57 | 57 | ||
| 58 | 58 | function appDoc() { | |
| 59 | 59 | try { | |
@@ -67,8 +67,8 @@ function appDoc() { | |||
| 67 | 67 | * Default application providers for testing. | |
| 68 | 68 | */ | |
| 69 | 69 | export const TEST_SERVER_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = | |
| 70 | - CONST_EXPR([ | ||
| 71 | - // TODO(julie): when angular2/platform/server is available, use that instead of making our own | ||
| 70 | + /*@ts2dart_const*/ [ | ||
| 71 | + // TODO(julie: when angular2/platform/server is available, use that instead of making our own | ||
| 72 | 72 | // list here. | |
| 73 | 73 | APPLICATION_COMMON_PROVIDERS, | |
| 74 | 74 | COMPILER_PROVIDERS, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,6 @@ export {ROUTER_PROVIDERS, ROUTER_BINDINGS} from 'angular2/src/router/router_prov | |||
| 20 | 20 | ||
| 21 | 21 | import {RouterOutlet} from './src/router/directives/router_outlet'; | |
| 22 | 22 | import {RouterLink} from './src/router/directives/router_link'; | |
| 23 | - import {CONST_EXPR} from './src/facade/lang'; | ||
| 24 | 23 | ||
| 25 | 24 | /** | |
| 26 | 25 | * A list of directives. To use the router directives like {@link RouterOutlet} and | |
@@ -44,4 +43,4 @@ import {CONST_EXPR} from './src/facade/lang'; | |||
| 44 | 43 | * bootstrap(AppCmp, [ROUTER_PROVIDERS]); | |
| 45 | 44 | * ``` | |
| 46 | 45 | */ | |
| 47 | - export const ROUTER_DIRECTIVES: any[] = CONST_EXPR([RouterOutlet, RouterLink]); | ||
| 46 | + export const ROUTER_DIRECTIVES: any[] = /*@ts2dart_const*/[RouterOutlet, RouterLink]; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | import {TEMPLATE_TRANSFORMS} from 'angular2/compiler'; | |
| 2 | 2 | import {Provider} from 'angular2/core'; | |
| 3 | 3 | import {RouterLinkTransform} from 'angular2/src/router/directives/router_link_transform'; | |
| 4 | - import {CONST_EXPR} from 'angular2/src/facade/lang'; | ||
| 5 | 4 | ||
| 6 | 5 | export {RouterLinkTransform} from 'angular2/src/router/directives/router_link_transform'; | |
| 7 | 6 | ||
@@ -32,4 +31,5 @@ export {RouterLinkTransform} from 'angular2/src/router/directives/router_link_tr | |||
| 32 | 31 | * ``` | |
| 33 | 32 | */ | |
| 34 | 33 | export const ROUTER_LINK_DSL_PROVIDER = | |
| 35 | - CONST_EXPR(new Provider(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true})); | ||
| 34 | + /*@ts2dart_const*/ | ||
| 35 | + new Provider(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true}); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - import {CONST_EXPR, Type} from 'angular2/src/facade/lang'; | ||
| 1 | + import {Type} from 'angular2/src/facade/lang'; | ||
| 2 | 2 | ||
| 3 | 3 | import {FORM_DIRECTIVES} from './forms'; | |
| 4 | 4 | import {CORE_DIRECTIVES} from './directives'; | |
@@ -46,4 +46,4 @@ import {CORE_DIRECTIVES} from './directives'; | |||
| 46 | 46 | * } | |
| 47 | 47 | * ``` | |
| 48 | 48 | */ | |
| 49 | - export const COMMON_DIRECTIVES: Type[][] = CONST_EXPR([CORE_DIRECTIVES, FORM_DIRECTIVES]); | ||
| 49 | + export const COMMON_DIRECTIVES: Type[][] = /*@ts2dart_const*/[CORE_DIRECTIVES, FORM_DIRECTIVES]; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - import {CONST_EXPR, Type} from 'angular2/src/facade/lang'; | ||
| 1 | + import {Type} from 'angular2/src/facade/lang'; | ||
| 2 | 2 | import {NgClass} from './ng_class'; | |
| 3 | 3 | import {NgFor} from './ng_for'; | |
| 4 | 4 | import {NgIf} from './ng_if'; | |
@@ -47,7 +47,7 @@ import {NgPlural, NgPluralCase} from './ng_plural'; | |||
| 47 | 47 | * } | |
| 48 | 48 | * ``` | |
| 49 | 49 | */ | |
| 50 | - export const CORE_DIRECTIVES: Type[] = CONST_EXPR([ | ||
| 50 | + export const CORE_DIRECTIVES: Type[] = /*@ts2dart_const*/[ | ||
| 51 | 51 | NgClass, | |
| 52 | 52 | NgFor, | |
| 53 | 53 | NgIf, | |
@@ -58,4 +58,4 @@ export const CORE_DIRECTIVES: Type[] = CONST_EXPR([ | |||
| 58 | 58 | NgSwitchDefault, | |
| 59 | 59 | NgPlural, | |
| 60 | 60 | NgPluralCase | |
| 61 | - ]); | ||
| 61 | + ]; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments