I am building a web app and mobile app with Angular and Native Script. I wanted to use the Angular Material Library for the Web App along with the code sharing project.
After installing Angular, I ran the command npm i -g @nativescript/schematics
to create a new project as mentioned in the native script guide After creating, i tried to install Angular Material with the command ng add @angular/material
, following which i got the logs as:
> ng add @angular/material
Skipping installation: Package already installed
? Choose a prebuilt theme name, or "custom" for a custom theme: Deep Purple/Amber [ Preview: https://material.angular.io?theme=deeppurple-amber ]
? Set up global Angular Material typography styles? Yes
? Set up browser animations for Angular Material? Yes
UPDATE package.json (1877 bytes)
√ Packages installed successfully.
Could not read Angular module file: /src/@src/app/app.module.ts
I then added the component as described in the Get Started Guide where i added the component to the app.module.ts
file and then calling the component in the html template as per the guidelines. Following which then I tried to run the project with ng serve
.
But I am not able to view any component in the Code Sharing Project where as in the regular Angular Web App Project everything works just fine. Any help is appreciated and thanking you in advance. Is there any thing else that needs to be done?