refactor: change remaining <template>
to <ng-template>
(#14706)
This commit is contained in:

committed by
Igor Minar

parent
bc9e1debf2
commit
d1182af1a4
@ -21,9 +21,9 @@ import {SwitchView} from './ng_switch';
|
||||
* @howToUse
|
||||
* ```
|
||||
* <some-element [ngPlural]="value">
|
||||
* <template ngPluralCase="=0">there is nothing</template>
|
||||
* <template ngPluralCase="=1">there is one</template>
|
||||
* <template ngPluralCase="few">there are a few</template>
|
||||
* <ng-template ngPluralCase="=0">there is nothing</ng-template>
|
||||
* <ng-template ngPluralCase="=1">there is one</ng-template>
|
||||
* <ng-template ngPluralCase="few">there are a few</ng-template>
|
||||
* </some-element>
|
||||
* ```
|
||||
*
|
||||
@ -89,8 +89,8 @@ export class NgPlural {
|
||||
* @howToUse
|
||||
* ```
|
||||
* <some-element [ngPlural]="value">
|
||||
* <template ngPluralCase="=0">...</template>
|
||||
* <template ngPluralCase="other">...</template>
|
||||
* <ng-template ngPluralCase="=0">...</ng-template>
|
||||
* <ng-template ngPluralCase="other">...</ng-template>
|
||||
* </some-element>
|
||||
*```
|
||||
*
|
||||
|
@ -352,7 +352,7 @@ export function main() {
|
||||
}));
|
||||
|
||||
it('should support injecting `NgFor` and get an instance of `NgForOf`', async(() => {
|
||||
const template = `<template ngFor [ngForOf]='items' let-item test></template>`;
|
||||
const template = `<ng-template ngFor [ngForOf]='items' let-item test></ng-template>`;
|
||||
fixture = createTestComponent(template);
|
||||
const testDirective = fixture.debugElement.childNodes[0].injector.get(TestDirective);
|
||||
const ngForOf = fixture.debugElement.childNodes[0].injector.get(NgForOf);
|
||||
|
@ -50,8 +50,8 @@ export function main() {
|
||||
it('should display the template according to the exact numeric value', async(() => {
|
||||
const template = '<div>' +
|
||||
'<ul [ngPlural]="switchValue">' +
|
||||
'<template ngPluralCase="0"><li>you have no messages.</li></template>' +
|
||||
'<template ngPluralCase="1"><li>you have one message.</li></template>' +
|
||||
'<ng-template ngPluralCase="0"><li>you have no messages.</li></ng-template>' +
|
||||
'<ng-template ngPluralCase="1"><li>you have one message.</li></ng-template>' +
|
||||
'</ul></div>';
|
||||
|
||||
fixture = createTestComponent(template);
|
||||
|
Reference in New Issue
Block a user