parent
4bbd9784ef
commit
758821c775
|
@ -12,7 +12,7 @@
|
||||||
<!-- #enddocregion hero-birthday-template-->
|
<!-- #enddocregion hero-birthday-template-->
|
||||||
|
|
||||||
<!-- #docregion format-birthday -->
|
<!-- #docregion format-birthday -->
|
||||||
<p>The hero's birthday is {{ birthday | date:"MM/dd/yy" }} /p>
|
<p>The hero's birthday is {{ birthday | date:"MM/dd/yy" }} </p>
|
||||||
<!-- #enddocregion format-birthday-->
|
<!-- #enddocregion format-birthday-->
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {HeroBirthday as HeroBirthday2} from './hero-birthday.2';
|
import {HeroBirthday as HeroBirthday2} from './hero-birthday';
|
||||||
import {PowerBooster} from './power-booster';
|
import {PowerBooster} from './power-booster';
|
||||||
import {PowerBoostCalculator} from './power-boost-calculator';
|
import {PowerBoostCalculator} from './power-boost-calculator';
|
||||||
import {HeroListComponent} from './hero-list-component';
|
import {HeroListComponent} from './hero-list-component';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {bootstrap, Component} from 'angular2/angular2'
|
import {bootstrap, Component} from 'angular2/angular2'
|
||||||
// #docregion hero-birthday2
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hero-birthday',
|
selector: 'hero-birthday',
|
||||||
template: `
|
template: `
|
||||||
|
@ -13,4 +13,4 @@ export class HeroBirthday {
|
||||||
toggle = true;
|
toggle = true;
|
||||||
toggleFormat() { this.toggle = !this.toggle; }
|
toggleFormat() { this.toggle = !this.toggle; }
|
||||||
}
|
}
|
||||||
// #enddocregion hero-birthday2
|
// #enddocregion
|
|
@ -17,7 +17,7 @@
|
||||||
<h4>Hero Birthday 1</h4>
|
<h4>Hero Birthday 1</h4>
|
||||||
<hero-birthday>loading...</hero-birthday>
|
<hero-birthday>loading...</hero-birthday>
|
||||||
<hr>
|
<hr>
|
||||||
<my-app>loading ...<my-app>
|
<my-app>loading ...</my-app>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"files":["!**/*.d.ts", "!**/*.js"]
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<div class="special">
|
<div class="special">
|
||||||
<!--<img src="http://www.wpclipart.com/cartoon/people/hero/hero_silhoutte_T.png">-->
|
<!--<img src="http://www.wpclipart.com/cartoon/people/hero/hero_silhoutte_T.png">-->
|
||||||
<img src="../../images/hero.png">
|
<img src="images/hero.png">
|
||||||
<button disabled>Save</button>
|
<button disabled>Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
-->
|
-->
|
||||||
<!-- property over attribute -->
|
<!-- property over attribute -->
|
||||||
<!-- examine the following <img> tag in the browser tools -->
|
<!-- examine the following <img> tag in the browser tools -->
|
||||||
<img src="../../images/ng-logo.png"
|
<img src="images/ng-logo.png"
|
||||||
[src]="heroImageUrl">
|
[src]="heroImageUrl">
|
||||||
<hr>
|
<hr>
|
||||||
<h3 [text-content]="title"></h3>
|
<h3 [text-content]="title"></h3>
|
||||||
|
|
|
@ -218,10 +218,10 @@ class AppComponent {
|
||||||
heroes = Hero.MockHeroes;
|
heroes = Hero.MockHeroes;
|
||||||
|
|
||||||
//heroImageUrl = 'http://www.wpclipart.com/cartoon/people/hero/hero_silhoutte_T.png';
|
//heroImageUrl = 'http://www.wpclipart.com/cartoon/people/hero/hero_silhoutte_T.png';
|
||||||
heroImageUrl = '../../images/hero.png';
|
heroImageUrl = 'images/hero.png';
|
||||||
|
|
||||||
//iconUrl = 'https://angular.io/resources/images/logos/standard/shield-large.png';
|
//iconUrl = 'https://angular.io/resources/images/logos/standard/shield-large.png';
|
||||||
iconUrl = '../../images/ng-logo.png';
|
iconUrl = 'images/ng-logo.png';
|
||||||
isActive = false;
|
isActive = false;
|
||||||
isSpecial = true;
|
isSpecial = true;
|
||||||
isUnchanged = true;
|
isUnchanged = true;
|
||||||
|
@ -291,7 +291,7 @@ class AppComponent {
|
||||||
title = 'Template Syntax'
|
title = 'Template Syntax'
|
||||||
val=2;
|
val=2;
|
||||||
// villainImageUrl = 'http://www.clker.com/cliparts/u/s/y/L/x/9/villain-man-hi.png'
|
// villainImageUrl = 'http://www.clker.com/cliparts/u/s/y/L/x/9/villain-man-hi.png'
|
||||||
villainImageUrl = '../../images/villain.png'
|
villainImageUrl = 'images/villain.png'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"description": "Template Syntax Collection"
|
"description": "Template Syntax Collection",
|
||||||
|
"files":["!**/*.d.ts", "!**/*.js"],
|
||||||
|
"tags": ["template"]
|
||||||
}
|
}
|
|
@ -17,6 +17,8 @@ include ../../../../_includes/_util-fns
|
||||||
|
|
||||||
Welcome, Angular pipes, the simple display-value transformations that we can declare in our HTML!
|
Welcome, Angular pipes, the simple display-value transformations that we can declare in our HTML!
|
||||||
|
|
||||||
|
[Live Example](/docs/_examples/pipes/ts/src/plnkr.html)
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
:marked
|
:marked
|
||||||
## Using Pipes
|
## Using Pipes
|
||||||
|
@ -74,7 +76,7 @@ include ../../../../_includes/_util-fns
|
||||||
|
|
||||||
Let's revise our example to bind the pipe's format parameter
|
Let's revise our example to bind the pipe's format parameter
|
||||||
to the component's `format` property.
|
to the component's `format` property.
|
||||||
+makeExample('pipes/ts/src/app/hero-birthday.2.ts', 'hero-birthday2')
|
+makeExample('pipes/ts/src/app/hero-birthday.ts')
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
We also added a button to the template and bound its click event to the component's `toggleFormat` method.
|
We also added a button to the template and bound its click event to the component's `toggleFormat` method.
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
include ../../../../_includes/_util-fns
|
include ../../../../_includes/_util-fns
|
||||||
|
|
||||||
a(href='/docs/_examples/template-syntax/ts/src/plnkr.html') Live Example 1
|
|
||||||
|
|
||||||
:marked
|
:marked
|
||||||
# Template Syntax
|
# Template Syntax
|
||||||
Our Angular application manages what the user sees and does through the interaction of a Component class instance and its user-facing template.
|
Our Angular application manages what the user sees and does through the interaction of a Component class instance and its user-facing template.
|
||||||
|
@ -12,8 +10,6 @@ a(href='/docs/_examples/template-syntax/ts/src/plnkr.html') Live Example 1
|
||||||
|
|
||||||
We’ll cover these basic elements of Template Syntax
|
We’ll cover these basic elements of Template Syntax
|
||||||
|
|
||||||
[Live Example 1](/docs/_examples/template-syntax/ts/src/plnkr.html)
|
|
||||||
|
|
||||||
>[HTML](#html)
|
>[HTML](#html)
|
||||||
|
|
||||||
>[Interpolation](#interpolation)
|
>[Interpolation](#interpolation)
|
||||||
|
@ -40,6 +36,8 @@ a(href='/docs/_examples/template-syntax/ts/src/plnkr.html') Live Example 1
|
||||||
|
|
||||||
>[Template Expression Operators](#expression-ops)
|
>[Template Expression Operators](#expression-ops)
|
||||||
|
|
||||||
|
[Live Example](/docs/_examples/template-syntax/ts/src/plnkr.html)
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
:marked
|
:marked
|
||||||
## HTML
|
## HTML
|
||||||
|
|
|
@ -78,7 +78,7 @@ function initConfigAndCollectFileNames(configFileName) {
|
||||||
return path.join(basePath, fileName);
|
return path.join(basePath, fileName);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var defaultExcludes = [ '!**/typings/**','!**/tsconfig.json', '!**/plnkr.html', '!**/*.plnkr.html' ];
|
var defaultExcludes = [ '!**/node_modules/**','!**/typings/**','!**/tsconfig.json', '!**/plnkr.html', '!**/*.plnkr.html' ];
|
||||||
Array.prototype.push.apply(gpaths, defaultExcludes);
|
Array.prototype.push.apply(gpaths, defaultExcludes);
|
||||||
|
|
||||||
config.fileNames = globule.find(gpaths);
|
config.fileNames = globule.find(gpaths);
|
||||||
|
|
Loading…
Reference in New Issue