Ionic2 Pipes is not working in modal
See original GitHub issueShort description of the problem:
I have created modal using given below format
Beta 10 code
let demo = Modal.create(DemoPage, { ID: id });
this.nav.present(demo);
if i present modal window like this TranslatePipe is working
but this same code is not working in beta 11
Beta 11
let demo = this.modalCtrl.create(DemoPage, { ID: id});
demo.present();
Js code :
import {TranslatePipe} from "ng2-translate/ng2-translate";
@Component({
templateUrl: "build/pages/demo/demo.html",
providers: [[DemoService]],
pipes: [TranslatePipe],
queries: {
content: new ViewChild(Content)
}
})
export class DemoPage {
}
HTML
<ion-title>{{ 'Demo.title' | translate}}</ion-title>
*Which Ionic Version? * ionic 2 beta 11
Run ionic info from terminal/cmd prompt: (paste output below) Cordova CLI: 6.3.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0-beta.33 Ionic App Lib Version: 2.0.0-beta.19 OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Node Version: v4.4.7
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
Modal window inside pipes is not working - Ionic Forum
Modal window inside pipes is not working ... import {NavController, MenuController, NavParams, ViewController, Events} from “ionic-angular”;
Read more >Angular number pipe doesn't work in a modal - Stack Overflow
I get an error - Error: NG0302: The pipe 'number' could not be found! when I used it in a modal of my...
Read more >Ionic Docs Example - StackBlitz
A angular-cli project based on rxjs, tslib, zone.js, core-js, @angular/core, @angular/router, @angular/common, @angular/compiler, @angular/animations, ...
Read more >How to Build an Ionic 5 Calendar with Modal & Customisation
The last missing piece is the modal view with some items as input fields and the calendar component just like before, but this...
Read more >How to Build an Ionic 5 Calendar with Modal & Customisation
Having a calendar component in your Ionic app could be an essential element for your whole app experience, and while there's not a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this could be an issue not special for modals but for all overlays (see issue #7592). You could try the following in your app.ts (excerpt):
Then in your modal you should omit the
pipes: [TranslatePipe]
statement of the@component
decorator.This works for my translations in v2 beta 11.
I have got this problem now. Since PLATFORM_PIPES has been deprecated, in RC6, How should I do?