Skip to content

Commit d45b8f9

Browse files
author
Nedyalko Nikolov
committed
Merge pull request #128 from NativeScript/nnikolov/IntlPolyfill
Added dependency to nativescript-intl which replaces global.Intl.
2 parents 51d9e41 + 1443552 commit d45b8f9

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

ng-sample/app/examples/renderer-test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Label [text]='model.deliveryDate' ></Label>-->
77
<SearchBar [(ngModel)]='model.search'></SearchBar>
88
<Label [text]='model.search'></Label>
9+
<Label [text]='model.mydate | date:"fullDate"'></Label>
910
<Slider [(ngModel)]='model.sliderTest'></Slider>
1011
<Label [text]='model.sliderTest'></Label>
1112
<ListPicker [items]='model.listPickerItems' [(ngModel)]='model.selectedIndex'></ListPicker>

ng-sample/app/examples/renderer-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export class RendererTest {
4949
'testBoolean': false,
5050
'deliveryDate': new Date(),
5151
'deliveryTime': new Date(),
52+
'mydate': new Date(),
5253
'sliderTest': 0,
5354
'search': null,
5455
'selectedIndex': 0,

ng-sample/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"homepage": "https://github.com/NativeScript/template-hello-world",
2525
"dependencies": {
2626
"tns-core-modules": "^2.0.0-angular-1",
27+
"nativescript-intl": "^0.0.2",
2728
"angular2": "2.0.0-beta.9",
2829
"parse5": "1.4.2",
2930
"punycode": "1.3.2",
@@ -47,7 +48,7 @@
4748
"nativescript": {
4849
"id": "org.nativescript.ngsample",
4950
"tns-android": {
50-
"version": "1.7.0"
51+
"version": "1.7.1"
5152
}
5253
}
5354
}

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@
66
"bugs": "http://www.telerik.com",
77
"contributors": [
88
"Hristo Deshev <hristo.deshev@telerik.com>"
9-
],
9+
],
1010
"license": "Apache-2.0",
1111
"repository": {
1212
"type": "git",
1313
"url": "https://github.com/NativeScript/nativescript-angular.git"
1414
},
1515
"scripts": {},
1616
"dependencies": {
17-
"tns-core-modules": "^2.0.0-angular-1",
18-
"angular2": "2.0.0-beta.9",
19-
"es6-shim": "^0.33.3",
20-
"parse5": "1.4.2",
21-
"punycode": "1.3.2",
22-
"querystring": "0.2.0",
23-
"url": "0.10.3",
24-
"reflect-metadata": "0.1.2",
25-
"rxjs": "5.0.0-beta.2",
26-
"zone.js": "0.5.15"
17+
"tns-core-modules": "^2.0.0-angular-1",
18+
"nativescript-intl": "^0.0.2",
19+
"angular2": "2.0.0-beta.9",
20+
"es6-shim": "^0.33.3",
21+
"parse5": "1.4.2",
22+
"punycode": "1.3.2",
23+
"querystring": "0.2.0",
24+
"url": "0.10.3",
25+
"reflect-metadata": "0.1.2",
26+
"rxjs": "5.0.0-beta.2",
27+
"zone.js": "0.5.15"
2728
},
2829
"devDependencies": {
2930
"grunt": "0.4.5",

src/nativescript-angular/application.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export type ProviderArray = Array<Type | Provider | any[]>;
4141

4242
import {defaultPageProvider} from "./platform-providers";
4343

44+
import * as nativescriptIntl from "nativescript-intl";
45+
global.Intl = nativescriptIntl;
46+
4447
let _platform = null;
4548

4649
export interface AppOptions {

tests/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"homepage": "http://nativescript.org",
3232
"dependencies": {
3333
"tns-core-modules": "2.0.0-angular-1",
34+
"nativescript-intl": "^0.0.2",
3435
"angular2": "2.0.0-beta.9",
3536
"nativescript-unit-test-runner": "^0.3.3",
3637
"parse5": "1.4.2",
@@ -53,4 +54,4 @@
5354
"shelljs": "^0.5.3",
5455
"typescript": "1.8.2"
5556
}
56-
}
57+
}

0 commit comments

Comments
 (0)