Nativescript 5 + Angular : could not open modal









up vote
0
down vote

favorite












i did not change anything from the project that worked perfectly on pre-current version(4.X.X) , but after updating the tns cli and tns-core-modules and android runtime to the latest version (5.0 .0) i could not open the modals anymore i get this error:




JS: ERROR TypeError: Cannot set property 'showingModal' of undefined




im calling the modal using this statments:



 const options: ModalDialogOptions = 
viewContainerRef: this.vcRef,
context: data,
fullscreen: true
;
return this.modalService.showModal(SomeComponentName, options).then(
data =>
console.log(data),
error =>
console.log(error);

);


PS 1 : i'm call this function from tabview item (outlet component like the default one used here ) .



PS 2 : i have imported and injected everything as usually (the modal works in the previous versions) .



PS 3 : i'm currently producing this issue using Android 8 (Samsung S7)



PS 4 : i have filled a bug report on the official nativescript-angular reporsity










share|improve this question





















  • Make sure your viewContainerRef is a direct decedent of page-router-outlet.
    – Manoj
    Nov 10 at 16:45















up vote
0
down vote

favorite












i did not change anything from the project that worked perfectly on pre-current version(4.X.X) , but after updating the tns cli and tns-core-modules and android runtime to the latest version (5.0 .0) i could not open the modals anymore i get this error:




JS: ERROR TypeError: Cannot set property 'showingModal' of undefined




im calling the modal using this statments:



 const options: ModalDialogOptions = 
viewContainerRef: this.vcRef,
context: data,
fullscreen: true
;
return this.modalService.showModal(SomeComponentName, options).then(
data =>
console.log(data),
error =>
console.log(error);

);


PS 1 : i'm call this function from tabview item (outlet component like the default one used here ) .



PS 2 : i have imported and injected everything as usually (the modal works in the previous versions) .



PS 3 : i'm currently producing this issue using Android 8 (Samsung S7)



PS 4 : i have filled a bug report on the official nativescript-angular reporsity










share|improve this question





















  • Make sure your viewContainerRef is a direct decedent of page-router-outlet.
    – Manoj
    Nov 10 at 16:45













up vote
0
down vote

favorite









up vote
0
down vote

favorite











i did not change anything from the project that worked perfectly on pre-current version(4.X.X) , but after updating the tns cli and tns-core-modules and android runtime to the latest version (5.0 .0) i could not open the modals anymore i get this error:




JS: ERROR TypeError: Cannot set property 'showingModal' of undefined




im calling the modal using this statments:



 const options: ModalDialogOptions = 
viewContainerRef: this.vcRef,
context: data,
fullscreen: true
;
return this.modalService.showModal(SomeComponentName, options).then(
data =>
console.log(data),
error =>
console.log(error);

);


PS 1 : i'm call this function from tabview item (outlet component like the default one used here ) .



PS 2 : i have imported and injected everything as usually (the modal works in the previous versions) .



PS 3 : i'm currently producing this issue using Android 8 (Samsung S7)



PS 4 : i have filled a bug report on the official nativescript-angular reporsity










share|improve this question













i did not change anything from the project that worked perfectly on pre-current version(4.X.X) , but after updating the tns cli and tns-core-modules and android runtime to the latest version (5.0 .0) i could not open the modals anymore i get this error:




JS: ERROR TypeError: Cannot set property 'showingModal' of undefined




im calling the modal using this statments:



 const options: ModalDialogOptions = 
viewContainerRef: this.vcRef,
context: data,
fullscreen: true
;
return this.modalService.showModal(SomeComponentName, options).then(
data =>
console.log(data),
error =>
console.log(error);

);


PS 1 : i'm call this function from tabview item (outlet component like the default one used here ) .



PS 2 : i have imported and injected everything as usually (the modal works in the previous versions) .



PS 3 : i'm currently producing this issue using Android 8 (Samsung S7)



PS 4 : i have filled a bug report on the official nativescript-angular reporsity







angular nativescript angular2-nativescript nativescript-angular






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 14:19









Hamza AlQabali

3115




3115











  • Make sure your viewContainerRef is a direct decedent of page-router-outlet.
    – Manoj
    Nov 10 at 16:45

















  • Make sure your viewContainerRef is a direct decedent of page-router-outlet.
    – Manoj
    Nov 10 at 16:45
















Make sure your viewContainerRef is a direct decedent of page-router-outlet.
– Manoj
Nov 10 at 16:45





Make sure your viewContainerRef is a direct decedent of page-router-outlet.
– Manoj
Nov 10 at 16:45


















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239856%2fnativescript-5-angular-could-not-open-modal%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239856%2fnativescript-5-angular-could-not-open-modal%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Top Tejano songwriter Luis Silva dead of heart attack at 64

政党

天津地下鉄3号線