Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit 1d90b2d

Browse files
Murazakiocombe
authored andcommitted
fix(Http): Fixing last mentions of Http
1 parent 3be3a07 commit 1d90b2d

File tree

2 files changed

+50
-33
lines changed

2 files changed

+50
-33
lines changed

Diff for: README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ Now you need to install the npm module for `TranslateHttpLoader`:
1717
npm install @ngx-translate/http-loader --save
1818
```
1919

20+
**NB: if you're still on Angular <4.3, please use Http from @angular/http with http-loader@0.1.0.**
21+
2022
## Usage
2123
#### 1. Setup the `TranslateModule` to use the `TranslateHttpLoader`:
2224

23-
The `TranslateHttpLoader` uses Http to load translations, which means that you have to import the HttpModule from `@angular/http` before the `TranslateModule`:
25+
The `TranslateHttpLoader` uses HttpClient to load translations, which means that you have to import the HttpClientModule from `@angular/common/http` before the `TranslateModule`:
2426

2527
```ts
2628
import {NgModule} from '@angular/core';
@@ -61,7 +63,7 @@ By using those default parameters, it will load your translations files for the
6163
You can change those in the `HttpLoaderFactory` method that we just defined. For example if you want to load the "en" translations from `/public/lang-files/en-lang.json` you would use:
6264

6365
```ts
64-
export function HttpLoaderFactory(http: Http) {
66+
export function HttpLoaderFactory(http: HttpClient) {
6567
return new TranslateHttpLoader(http, "/public/lang-files/", "-lang.json");
6668
}
6769
```

Diff for: yarn.lock

+46-31
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,67 @@
22
# yarn lockfile v1
33

44

5-
"@angular/animations@4.1.3":
6-
version "4.1.3"
7-
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.1.3.tgz#6e89a1e0fbfd6d0e90be4f2ae190aac67f83a411"
5+
"@angular/animations@4.3.1":
6+
version "4.3.1"
7+
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.3.1.tgz#1f7e0bb803efc21c608246e6765a1c647f3d1a5f"
8+
dependencies:
9+
tslib "^1.7.1"
810

9-
"@angular/common@4.1.3":
10-
version "4.1.3"
11-
resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.1.3.tgz#e7c4791e32131cf74c239428c2a67daab2eef017"
11+
"@angular/common@4.3.1":
12+
version "4.3.1"
13+
resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.3.1.tgz#260f487a7cdca326c436bd3ea9515c797de2ff72"
14+
dependencies:
15+
tslib "^1.7.1"
1216

13-
"@angular/compiler-cli@4.1.3":
14-
version "4.1.3"
15-
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.1.3.tgz#c2362ffdf65756471481f839fab675bcac213f96"
17+
"@angular/compiler-cli@4.3.1":
18+
version "4.3.1"
19+
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.3.1.tgz#00b41afb6faeb4aef561b8427804ac8880aff63c"
1620
dependencies:
17-
"@angular/tsc-wrapped" "4.1.3"
21+
"@angular/tsc-wrapped" "4.3.1"
1822
minimist "^1.2.0"
1923
reflect-metadata "^0.1.2"
2024

21-
"@angular/compiler@4.1.3":
22-
version "4.1.3"
23-
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.1.3.tgz#d2dd30853b0cf4a54758b4a314632c231f9c94c3"
25+
"@angular/compiler@4.3.1":
26+
version "4.3.1"
27+
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.3.1.tgz#3a24d49ecf01ac2b6e07f63e378b8ff8e257fe09"
28+
dependencies:
29+
tslib "^1.7.1"
2430

25-
"@angular/core@4.1.3":
26-
version "4.1.3"
27-
resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.1.3.tgz#285498eb86ab7d0b6f982f8f9f487ef610013b35"
31+
"@angular/core@4.3.1":
32+
version "4.3.1"
33+
resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.3.1.tgz#a9d0a7d644b96260674269b689a04feea632a8d3"
34+
dependencies:
35+
tslib "^1.7.1"
2836

29-
"@angular/http@4.1.3":
30-
version "4.1.3"
31-
resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.1.3.tgz#eb9d1c302a0172815f9a573310d9be0bdeb845ae"
37+
"@angular/http@4.3.1":
38+
version "4.3.1"
39+
resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.3.1.tgz#e4f661f746711e88ecbea76a3c905babf97d315a"
40+
dependencies:
41+
tslib "^1.7.1"
3242

33-
"@angular/platform-browser-dynamic@4.1.3":
34-
version "4.1.3"
35-
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.1.3.tgz#3c13fdcf591d487f6efdc1d46913f280c6d8c2ec"
43+
"@angular/platform-browser-dynamic@4.3.1":
44+
version "4.3.1"
45+
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.3.1.tgz#84034da60a82ef36e7effda7b3ade6e645b330b3"
46+
dependencies:
47+
tslib "^1.7.1"
3648

37-
"@angular/platform-browser@4.1.3":
38-
version "4.1.3"
39-
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.1.3.tgz#4fa1db5119dd178b315ddae5b329bee1a932a5bd"
49+
"@angular/platform-browser@4.3.1":
50+
version "4.3.1"
51+
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.3.1.tgz#db727b06eed64bda5defec71815db26a4da2f690"
52+
dependencies:
53+
tslib "^1.7.1"
4054

41-
"@angular/platform-server@4.1.3":
42-
version "4.1.3"
43-
resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-4.1.3.tgz#bbfae42b15730357751da0e145d686f925a94431"
55+
"@angular/platform-server@4.3.1":
56+
version "4.3.1"
57+
resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-4.3.1.tgz#3b915fc4013c6a947a8c147b4db0279b025936eb"
4458
dependencies:
4559
parse5 "^3.0.1"
60+
tslib "^1.7.1"
4661
xhr2 "^0.1.4"
4762

48-
"@angular/tsc-wrapped@4.1.3":
49-
version "4.1.3"
50-
resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.1.3.tgz#2d6372c9187bf1621eacd960b94b39c4f95293cd"
63+
"@angular/tsc-wrapped@4.3.1":
64+
version "4.3.1"
65+
resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.3.1.tgz#f6616a4d2a3bbec1cded664fd1f526edce99ef41"
5166
dependencies:
5267
tsickle "^0.21.0"
5368

0 commit comments

Comments
 (0)