Hello Guys,
Hope you are doing well,
I have one question i am create a simple angular-17 module federation project. Install angular material but not working how to install.
Project Structure->
angular-project main file inside two module e-commerce and food-delivery i want to install angular material in e-commerce.

Ankit RaiRank #1,732 · 873 reputationPosted Apr 7, 2024, 3:22 AM EDT
Mohammad Tahir Ansari Here i am use angular 17 version you known angular 17 not provide module files hence here i am not include material file.
Tahir AnsariRank #366 · 6.8K reputationPosted Apr 7, 2024, 1:59 AM EDT
Navigate to the root directory of your
e-commercemodule:cd e-commerceInstall Angular Material and its dependencies using npm or yarn:
In your
e-commerce.module.tsfile, import the necessary modules:import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { MatButtonModule } from '@angular/material/button'; // Import other Material modules you need (e.g., MatCardModule, MatInputModule, etc.) @NgModule({ declarations: [ ], imports: [ BrowserModule, // Other module imports MatButtonModule, // Add Material modules here ], providers: [], bootstrap: [ /* Your e-commerce module's main component */ ] }) export class ECommerceModule { }Create a theme CSS file (e.g.,
e-commerce-theme.css) and define your theme styles. You can reference the Material Design documentation for theme customization options: https://material.angular.io/guide/themingInclude your theme CSS file in
angular.jsonunder thestylesarray for thee-commercemodule:"projects": { "e-commerce": { "root": "src/app/e-commerce", "sourceRoot": "src/app/e-commerce/src", "projectType": "application", "architect": { "build": { "options": { "styles": [ "node_modules/@angular/material/prebuilt-themes/indigo-pink.css", // Include a Material theme "src/styles.css", "src/e-commerce-theme.css" // Your custom theme ], // ... other build options } } // ... other architect options } } // ... other projects }