Skip to content
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

md-icon #281

Merged
merged 45 commits into from
Apr 23, 2016
Merged

md-icon #281

merged 45 commits into from
Apr 23, 2016

Conversation

dozingcat
Copy link
Contributor

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 8, 2016
@jelbourn jelbourn added the in progress This issue is currently in progress label Apr 8, 2016
@jelbourn jelbourn changed the title Mdicon md-icon (in-progress) Apr 8, 2016
}

@Injectable()
export class MdIconProvider {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to come up with a better name for this class, since it would be good to move away from the Angular 1 "provider" concept. What do you think about MdIconRegistry ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG

* Sets the CSS class name to be used for icon fonts when an <md-icon> component does not
* have a fontSet input value, and is not loading an icon by name or URL.
*/
setDefaultFontSetClass(className: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing return value type (this)

return this._inProgressUrlFetches.get(url);
}
const req = this._http.get(url)
.map((response) => response.text())
Copy link
Contributor

@hansl hansl Apr 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget the whole thing. Apparently HTTP doesn't have a way to do that.

Note that a flatMap might be a good idea if the server returns multiple elements.


@Component({
selector: 'test-app',
template: `<md-icon aria-label="{{ariaLabel}}" alt="{{altText}}">{{iconName}}</md-icon>`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment:
for all these tests where you're using the {{ }} inside the attribute value, they should instead use the [ ] syntax, e.g.:

<md-icon [attr.aria-label]="ariaLabel" [alt]="altText">{{iconName}}</md-icon>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Incidentally the documentation slightly leans toward interpolation: https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding

There is no technical reason to prefer one form to the other. We lean toward readability, which tends to favor interpolation.

@jelbourn
Copy link
Member

LGTM aside from those last two minor comments.

@jelbourn jelbourn merged commit a094a33 into angular:master Apr 23, 2016
@dozingcat dozingcat deleted the mdicon branch April 23, 2016 02:18
andrewseguin pushed a commit to andrewseguin/components that referenced this pull request Oct 15, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants