właśnie uaktualniony do Ionic 3.0.1
więc mogę używać LazyLoading
, a ponieważ, że nie mogę korzystać z mojego zwyczaju Pipes
:Ionic-3 nie można znaleźć potoku
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'StripHTML'
})
export class StripHTML implements PipeTransform {
transform(value, args) {
let striped = value.replace(/(<([^>]+)>)/g, "");
if (args != null) {
if (args.split != null) {
striped = striped.split(args.split);
if (args.index != null) {
striped = striped[args.index];
}
}
}
return striped;
}
}
aw app.module.ts
Dodałem go do deklaracje:
@NgModule({
declarations: [
........,
StripHTML
],
...
teraz gdy próbuję użyć go w nim błędów html
szablon:
core.es5.js:1085 ERROR Error: Uncaught (in promise): Error: Template parse errors:
The pipe 'StripHTML' could not be found ("
<ion-card-content>
<ion-card-title style="font-size: 100%">
{{ [ERROR ->]product.title | StripHTML }}
</ion-card-title>
</ion-card-content>
"): ng:///HomeModule/[email protected]:17
Czy jest tu coś, czego mi brakuje?
Mam podobny błąd, ponieważ migracji: Nie można odnaleźć nazwy „PipeTransform” – jug