Skip to content

Commit c0086aa

Browse files
committed
angular auth updates
1 parent 102741e commit c0086aa

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

src/fragments/lib/auth/js/enable_sign_in_sign_up.mdx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,16 @@ Amplify.configure(amplifyconfig);
137137
export class AppModule {}
138138
```
139139

140-
Next, import the default theme inside __styles.css__:
141-
142-
```css
143-
@import '~@aws-amplify/ui-angular/theme.css';
144-
````
140+
Next, import the default theme inside __angular.json__:
141+
142+
```json title="angular.json"
143+
...
144+
"styles": [
145+
"node_modules/@aws-amplify/ui-angular/theme.css",
146+
"src/styles.css"
147+
],
148+
...
149+
```
145150

146151
Next, open __app.component.html__ and add the `amplify-authenticator` component.
147152

src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ npm add aws-amplify
129129
```
130130
</InlineFilter>
131131

132-
<InlineFilter filters={["react", "angular", "javascript", "nextjs", "react-native"]}>
132+
<InlineFilter filters={["react", "javascript", "nextjs", "react-native"]}>
133133

134134
In your app's entry point, typically **main.tsx** for React apps created using Vite, make the following edits:
135135

@@ -142,6 +142,15 @@ Amplify.configure(outputs);
142142

143143
</InlineFilter>
144144

145+
<InlineFilter filters={["angular"]}>
146+
In your app's entry point, typically **main.ts** or **app.component.ts** for Angular apps created using Vite, make the following edits:
147+
```tsx title="src/main.ts"
148+
import { Amplify } from 'aws-amplify';
149+
import outputs from '../amplify_outputs.json';
150+
Amplify.configure(outputs);
151+
```
152+
</InlineFilter>
153+
145154
<InlineFilter filters={["vue"]}>
146155

147156
In your app's entry point, typically **main.ts** for Vue apps created using Vite, make the following edits:

src/pages/[platform]/start/quickstart/index.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ import { TodosComponent } from './todos/todos.component';
11111111
import { Amplify } from 'aws-amplify';
11121112
import outputs from '../../amplify_outputs.json';
11131113
// highlight-next-line
1114-
import { AmplifyAuthenticatorModule, AuthenticatorService } from '@aws-amplify/ui-angular';
1114+
import { AmplifyAuthenticatorModule } from '@aws-amplify/ui-angular';
11151115

11161116
Amplify.configure(outputs);
11171117

@@ -1125,11 +1125,9 @@ Amplify.configure(outputs);
11251125
})
11261126
export class AppComponent {
11271127
title = 'amplify-angular-template';
1128-
// highlight-start
1129-
constructor(public authenticator: AuthenticatorService) {
1130-
Amplify.configure(outputs);
1131-
}
1132-
// highlight-end
1128+
1129+
constructor() {}
1130+
11331131
}
11341132
```
11351133
Update the application UI and include styles.

0 commit comments

Comments
 (0)