Skip to content

Commit

Permalink
chore(docs): Update docs for Angular 5 support (#92)
Browse files Browse the repository at this point in the history
Closes #91
  • Loading branch information
brandonroberts authored Nov 16, 2017
1 parent 61f8d9d commit 7ca06b0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ A Webpack loader for Angular that enables string-based module loading with the `

Add the `angular-router-loader` to your typescript loaders

**Angular Version >= 5**

```ts
loaders: [
{
test: /\.ts$/,
loaders: [
'awesome-typescript-loader'
]
},
{
test: /\.(ts|js)$/,
loaders: [
'angular-router-loader'
]
}
]
```

**Angular Version < 5**

```ts
loaders: [
{
Expand All @@ -23,7 +44,7 @@ loaders: [
'awesome-typescript-loader',
'angular-router-loader'
]
}
}
]
```

Expand Down
26 changes: 25 additions & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ load the Angular compiled factory file and factory class based on the provided f

### genDir `(default: '')`

**NOTE:** Angular version < 5 only

In your `tsconfig.json`, if you set the `genDir` in the `angularCompilerOptions` to compile to a separate directory, this option needs to be set to the same value here.

## AoT example
Expand All @@ -93,6 +95,28 @@ tsconfig.json (Angular Compiler Options)
```

Webpack Configuration (TypeScript loaders)

**Angular Version >= 5**

```ts
loaders: [
{
test: /\.ts$/,
loaders: [
'awesome-typescript-loader'
]
},
{
test: /\.(ts|js)$/,
loaders: [
'angular-router-loader?aot=true'
]
}
]
```

**Angular Version < 5**

```ts
loaders: [
{
Expand All @@ -101,7 +125,7 @@ loaders: [
'awesome-typescript-loader',
'angular-router-loader?aot=true&genDir=compiled'
]
}
}
]
```

Expand Down

0 comments on commit 7ca06b0

Please sign in to comment.