Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
chore(docs) - update readme(s) for local viewing of online docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Aug 29, 2014
1 parent 042e519 commit 6b99c1b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ This project is still in early preview. It is a complementary effort to the [Pol

You can see these components in action at http://material.angularjs.org

Or you run build the docs and demos locally. See the [Documentation README](https://github.com/angular/material/tree/master/docs) for details.

## Development

This project is in early development via a small core team of [Ionic Framework](http://ionicframework.com/) and [AngularJS](http://angularjs.org) developers. We don't have guidelines yet for broader community involvement, although we hope to have some soon.
Expand Down
17 changes: 16 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,19 @@ To view docs:
2. `cd dist/docs` and start an http server (e.g. `python -m SimpleHTTPServer`)
3. Navigate to the server, and enjoy (e.g. http://localhost:8000)

Run `gulp watch` to watch and rebuild docs on every save.
> Another solution is to use `npm install -g httpster` and then launch the HTTP server with with the command
```sh
httpster -p 8000 -d ./dist/docs
```

Then run `gulp watch` to watch and rebuild docs on every save.

#### Easy Debugging

Debugging directly in the Docs is complicated due to iFrames and multiple demos loading and initializing.

To open a demo outside of the Doc iframe(s), just navigate to component demo directly. For example, to debug the Toolbar demo and code, browser navigate to:

```sh
http://localhost:8000/generated/material.components.toolbar/demo/demo1/index.html
```
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
angular.module('material.services.expectAria', [])

.service('$expectAria', [
.service('$aria', [
'$log',
ExpectAriaService
AriaService
]);

function ExpectAriaService($log) {
function AriaService($log) {
var messageTemplate = 'ARIA: Attribute "%s", required for accessibility, is missing on "%s"!';
var defaultValueTemplate = 'Default value was set: %s="%s".';

return function expect(element, attrName, defaultValue) {
return {

expect : expectAttribute,
assign : assignAttributes
};


function assignAttributes(element, options )
{
angular.forEach(options, function( attrName, attrValue) {
element.attr(attrName, attrValue);
});

}

function expectAttribute(element, attrName, defaultValue) {

var node = element[0];
if (!node.hasAttribute(attrName)) {
Expand All @@ -24,7 +39,8 @@ function ExpectAriaService($log) {
// $log.warn(messageTemplate, attrName, getTagString(node));
}
}
};
}


/**
* Gets the tag definition from a node's outerHTML
Expand Down

0 comments on commit 6b99c1b

Please sign in to comment.