Skip to content

docs(autocomplete): add basic autocomplete examples #5464

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

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
- env: "MODE=browserstack_required"
- env: "MODE=travis_required"
- stage: Deploy
script: ./scripts/ci/publish-artifacts.sh
env: "MODE=release"

env: "DEPLOY_MODE=build-artifacts"
- env: "DEPLOY_MODE=docs-content"
- env: "DEPLOY_MODE=screenshot-tool"
- env: "DEPLOY_MODE=dashboard"
env:
global:
- LOGS_DIR=/tmp/angular-material2-build/logs
Expand All @@ -51,7 +52,7 @@ before_script:
- mkdir -p $LOGS_DIR

script:
- ./scripts/ci/build-and-test.sh
- ./scripts/ci/travis-script.sh

cache:
directories:
Expand Down
4 changes: 2 additions & 2 deletions e2e/components/checkbox-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('checkbox', () => {

it('should be checked when clicked, and unchecked when clicked again', async () => {
let checkboxEl = element(by.id('test-checkbox'));
let inputEl = element(by.css('input[id=input-test-checkbox]'));
let inputEl = element(by.css('input[id=test-checkbox-input]'));

screenshot('start');
checkboxEl.click();
Expand All @@ -32,7 +32,7 @@ describe('checkbox', () => {
});

it('should toggle the checkbox when pressing space', () => {
let inputEl = element(by.css('input[id=input-test-checkbox]'));
let inputEl = element(by.css('input[id=test-checkbox-input]'));

expect(inputEl.getAttribute('checked'))
.toBeFalsy('Expect checkbox "checked" property to be false');
Expand Down
27 changes: 27 additions & 0 deletions e2e/components/sidenav-e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {browser, by, element, ExpectedConditions} from 'protractor';
const EC = ExpectedConditions;

describe('sidenav', () => {
describe('opening and closing', () => {
beforeEach(() => browser.get('/sidenav'));

let input = element(by.tagName('md-sidenav'));


it('should be closed', () => {
expect(input.isDisplayed()).toBeFalsy();
});

it('should open', () => {
element(by.buttonText('Open sidenav')).click();
expect(input.isDisplayed()).toBeTruthy();
});

it('should close again', () => {
element(by.buttonText('Open sidenav')).click();
element(by.buttonText('Open sidenav')).click();
browser.wait(EC.presenceOf(element(by.className('mat-sidenav-closed'))), 1000);
expect(input.isDisplayed()).toBeFalsy();
});
});
});
8 changes: 5 additions & 3 deletions guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ For existing apps, follow these steps to begin using Angular Material.
npm install --save @angular/material @angular/cdk
```

A snapshot build with the latest changes from master is also available. Note that this snapshot build should not be considered stable and may break between releases.
A snapshot build with the latest changes from master is also available. Note that this snapshot
build should not be considered stable and may break between releases.

```bash
npm install --save angular/material2-builds angular/cdk-builds
Expand Down Expand Up @@ -134,15 +135,16 @@ Note that `md-icon` supports any font or svg icons; using Material Icons is one

## Appendix: Configuring SystemJS

If your project is using SystemJS for module loading, you will need to add `@angular/material`
to the SystemJS configuration:
If your project is using SystemJS for module loading, you will need to add `@angular/material` and
`@angular/cdk` to the SystemJS configuration:

```js
System.config({
// existing configuration options
map: {
// ...
'@angular/material': 'npm:@angular/material/bundles/material.umd.js',
'@angular/cdk': 'npm:@angular/cdk/bundles/cdk.umd.js'
// ...
}
});
Expand Down
8 changes: 8 additions & 0 deletions guides/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ different SASS mixins.
@include angular-material-typography($custom-typography);
```

If you're using Material's theming, you can also pass in your typography config to the
`mat-core` mixin:

```scss
// Override the typography in the core CSS.
@include mat-core($custom-typography);
```

For more details about the typography functions and default config, see the
[source](https://github.com/angular/material2/blob/master/src/lib/core/typography/_typography.scss).

Expand Down
Loading