in Education by
I'm not sure why the change detection wouldn't work here. I've tried a few things, including a setTimeout. I'm using RC5. Basically I want to change the content based off of a parameter in my URL. Should be pretty simple right? thanks.ts import { Component } from '@angular/core'; import { Card } from '../../components/card/card'; import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'sd-thanks', styleUrls: ['thanks.css'], directives: [Card], templateUrl: 'thanks.html' }) export class Thanks { params: any; coming: any; constructor(public route: ActivatedRoute) { this.params = this.route.params.subscribe( params => { this.coming = params['coming']; console.log(this.coming); // this consoles the correct true/false value } ); } } thanks.html
We can't wait to see you!
We will certainly miss you!
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Params can only be strings because they come from the URL If you change it to this.coming = params['coming'] && params['coming'].toLowerCase() === 'true'; it should work.

Related questions

0 votes
    I'm not sure why the change detection wouldn't work here. I've tried a few things, including a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I have a split screen design. I'd like to access the folder ID from the parent route only when ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 30, 2022 in Education by JackTerrance
0 votes
    I have an angular 7 project and I'm using Angular universal. Everything is working fine except when I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 30, 2022 in Education by JackTerrance
0 votes
    Each message published to a topic is delivered to _______ within each subscribing consumer group. (1)all consumer ... (3)zero consumer instances (4)multiple consumer instances...
asked Jun 17, 2021 in Technology by JackTerrance
0 votes
    Trying to search trough extrnal api Weather servis. Api is tested and works fine. Problem: Enter value in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    Trying to search trough extrnal api Weather servis. Api is tested and works fine. Problem: Enter value in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I have an ASP.NET MVC website. In my backend I have a table called People with the following ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    Using Play Framework, you can do something like this: public static void mymethod() { // do stuff ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    I am using jquery ajax get. SO when my form is submitted it then submits to a php file but the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    I am using jquery ajax get. SO when my form is submitted it then submits to a php file but the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    I have implemented a User Control in which I have bound the DataContext to itself like this... this. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    AngularJS Vs. Angular 2 Vs. Angular 4: Understanding the Differences...
asked Nov 19, 2020 in Education by Editorial Staff
0 votes
    I have used angular-cli with systemJS and am now comfortable with its build process,test cases & component ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    How does one share data between components in Angular?...
asked Jun 30, 2021 in Technology by JackTerrance
0 votes
    How does an Angular application work?...
asked Jun 29, 2021 in Technology by JackTerrance
...