Skip to content

Commit

Permalink
angular auth updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akilisosa committed Jan 5, 2025
1 parent 102741e commit c0086aa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
15 changes: 10 additions & 5 deletions src/fragments/lib/auth/js/enable_sign_in_sign_up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,16 @@ Amplify.configure(amplifyconfig);
export class AppModule {}
```

Next, import the default theme inside __styles.css__:

```css
@import '~@aws-amplify/ui-angular/theme.css';
````
Next, import the default theme inside __angular.json__:

```json title="angular.json"
...
"styles": [
"node_modules/@aws-amplify/ui-angular/theme.css",
"src/styles.css"
],
...
```

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

Expand Down
11 changes: 10 additions & 1 deletion src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ npm add aws-amplify
```
</InlineFilter>

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

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

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

</InlineFilter>

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

<InlineFilter filters={["vue"]}>

In your app's entry point, typically **main.ts** for Vue apps created using Vite, make the following edits:
Expand Down
10 changes: 4 additions & 6 deletions src/pages/[platform]/start/quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ import { TodosComponent } from './todos/todos.component';
import { Amplify } from 'aws-amplify';
import outputs from '../../amplify_outputs.json';
// highlight-next-line
import { AmplifyAuthenticatorModule, AuthenticatorService } from '@aws-amplify/ui-angular';
import { AmplifyAuthenticatorModule } from '@aws-amplify/ui-angular';

Amplify.configure(outputs);

Expand All @@ -1125,11 +1125,9 @@ Amplify.configure(outputs);
})
export class AppComponent {
title = 'amplify-angular-template';
// highlight-start
constructor(public authenticator: AuthenticatorService) {
Amplify.configure(outputs);
}
// highlight-end

constructor() {}

}
```
Update the application UI and include styles.
Expand Down

0 comments on commit c0086aa

Please sign in to comment.