Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 06c694d

Browse files
authored
Fix asset urls for examples that load images/icons (#60)
* Fix asset urls for examples that load images/icons * Missing semi-colon * asset
1 parent 049117c commit 06c694d

File tree

10 files changed

+18
-10
lines changed

10 files changed

+18
-10
lines changed

src/app/examples/card-fancy/card-fancy-example.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
}
44

55
.example-header-image {
6-
background-image: url('shiba1.jpg');
6+
background-image: url('assets/img/examples/shiba1.jpg');
77
background-size: cover;
88
}

src/app/examples/card-fancy/card-fancy-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<md-card-title>Shiba Inu</md-card-title>
55
<md-card-subtitle>Dog Breed</md-card-subtitle>
66
</md-card-header>
7-
<img md-card-image src="shiba2.jpg">
7+
<img md-card-image src="assets/img/examples/shiba2.jpg">
88
<md-card-content>
99
<p>
1010
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.

src/app/examples/icon-svg-example/ic_3d_rotation_black_24px.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<md-icon svgSrc="ic_3d_rotation_black_24px.svg"></md-icon>
1+
<md-icon svgIcon="thumbs-up"></md-icon>
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import {Component} from '@angular/core';
2+
import {DomSanitizer} from '@angular/platform-browser';
3+
import {MdIconRegistry} from '@angular/material';
24

35

46
@Component({
57
selector: 'icon-svg-example',
68
templateUrl: './icon-svg-example.html',
79
})
8-
export class IconSvgExample {}
10+
export class IconSvgExample {
11+
constructor(iconRegistry: MdIconRegistry, sanitizer: DomSanitizer) {
12+
iconRegistry.addSvgIcon(
13+
'thumbs-up',
14+
sanitizer.bypassSecurityTrustResourceUrl('assets/img/examples/thumbup-icon.svg'));
15+
}
16+
}

src/app/pages/homepage/homepage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h2>Fast and Consistent</h2>
3737
</div>
3838
<div class="docs-homepage-promo-desc">
3939
<h2>Versatile</h2>
40-
<p>Themable, for when you need to stay on brand or just have a facourite color.
40+
<p>Themable, for when you need to stay on brand or just have a favorite color.
4141
Accessible and internationalized so that all users are welcome.</p>
4242
</div>
4343
</div>

src/assets/documents/overview/icon.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p><code>md-icon</code> makes it easier to use <em>vector-based</em> icons in your app. This directive supports both
22
icon fonts and SVG icons, but not bitmap-based formats (png, jpg, etc.).</p>
3-
<div material-docs-example="icon-example"></div>
3+
<div material-docs-example="icon-overview"></div>
44
<h3 id="registering-icons">Registering icons</h3>
55
<p><code>MdIconRegistry</code> is an injectable service that allows you to associate icon names with SVG URLs and
66
define aliases for CSS font classes. Its methods are discussed below and listed in the API summary.</p>
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)