This repository has been archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(style-guide): spell const variables in lower camel case
Changes previous guidance on const which insisted on UPPER_SNAKE_CASE
- Loading branch information
Showing
4 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
public/docs/_examples/style-guide/ts/03-02/app/app.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { HEROES_URL, VILLAINS_URL } from './shared'; | ||
import { heroesUrl, mockHeroes, VILLAINS_URL } from './shared'; | ||
|
||
@Component({ | ||
selector: 'sg-app', | ||
template: ` | ||
<div>Heroes url: {{heroesUrl}}</div> | ||
<div>Villains url: {{villainsUrl}}</div> | ||
`, | ||
<h4>Mock Heroes</h4> | ||
<div *ngFor="let hero of heroes">{{hero}}</div> | ||
` | ||
}) | ||
export class AppComponent { | ||
heroesUrl = HEROES_URL; | ||
villainsUrl = VILLAINS_URL; | ||
heroes = mockHeroes; // prefer | ||
heroesUrl = heroesUrl; // prefer | ||
villainsUrl = VILLAINS_URL; // tolerate | ||
} |
7 changes: 0 additions & 7 deletions
7
public/docs/_examples/style-guide/ts/03-02/app/shared/data.service.avoid.ts
This file was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
public/docs/_examples/style-guide/ts/03-02/app/shared/data.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
// #docregion | ||
// #docregion example | ||
export const HEROES_URL = 'api/heroes'; | ||
export const VILLAINS_URL = 'api/villains'; | ||
// #enddocregion example | ||
export const mockHeroes = ['Sam', 'Jill']; // prefer | ||
export const heroesUrl = 'api/heroes'; // prefer | ||
export const VILLAINS_URL = 'api/villains'; // tolerate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters