-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): add how-to's for angular material inclusion #3897
Conversation
49f8420
to
682ac28
Compare
Install the `@angular/material` library and add the dependency to package.json... | ||
```bash | ||
npm install --save @angular/material | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good first start. cheers!
|
||
Create a new project and navigate into the project... | ||
``` | ||
ng new my-app && cd my-app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split into two lines.
Now that the project is set up, it must be configured to include the CSS for a theme. Angular Material ships with some prebuilt theming, which is located in `node_modules/@angular/material/core/theming/prebuilt`. | ||
|
||
To add an angular CSS theme and material icons to your app... | ||
```css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sass
typing, not css
.
- [Theming Angular Material](https://material.angular.io/guide/theming) | ||
- [Theming your own components](https://material.angular.io/guide/theming-your-components) | ||
|
||
# Include [Flex Layout](https://github.com/angular/flex-layout) for [Angular Material](https://material.angular.io) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Flex Layout
is a separate library and should have its own guide, since you can use it without Material. I'm asking around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. I considered a separate guide for it, but stitching them together made sense when I considered that they currently ship together for v1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hansl - am I to do a separate PR for the flex stuff?
ng new my-app && cd my-app | ||
``` | ||
|
||
With the new project created and ready, you will next need to install Angular Material. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line, it's just repeating the lines above and below it.
|
||
Import the Angular Material NgModule into your app module... | ||
```javascript | ||
//in src/app/app.module.ts --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove -->
?
], | ||
... | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra empty line.
|
||
``` | ||
|
||
Now that the project is set up, it must be configured to include the CSS for a theme. Angular Material ships with some prebuilt theming, which is located in `node_modules/@angular/material/core/theming/prebuilt`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prebuilt/
is a directory, you should end that path with an extra /
to indicate so.
@import '~https://fonts.googleapis.com/icon?family=Material+Icons'; | ||
``` | ||
|
||
Run `ng serve` to run your application in develop mode, and navigate to `http://localhost:4200`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"in development mode".
|
||
Run `ng serve` to run your application in develop mode, and navigate to `http://localhost:4200`. | ||
|
||
To verify angular material has been set up correctly, change `src/app/app.component.html` to the following... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capital A and capital M to Angular Material, here and everywhere else.
22ab909
to
bed3566
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hansl - all changes made (minus undecided Flex-Layout scenario). Lmk.
- [Theming Angular Material](https://material.angular.io/guide/theming) | ||
- [Theming your own components](https://material.angular.io/guide/theming-your-components) | ||
|
||
# Include [Flex Layout](https://github.com/angular/flex-layout) for [Angular Material](https://material.angular.io) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. I considered a separate guide for it, but stitching them together made sense when I considered that they currently ship together for v1.
981efdc
to
6123429
Compare
3a0cc02
to
6dd682d
Compare
Can you please rebase |
6dd682d
to
feefa35
Compare
…lex layout inclusion applies to angular#2711
…lex layout inclusion applies to angular#2711 Close angular#3897
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
applies to #2711