# All files / app app.component.ts

100% Statements 12/12
100% Branches 0/0
100% Functions 1/1
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    661x
    1x
    1x
    1x
    1x

    1x
    3x

    3x

    1x

    1x

     import { Component, OnInit, inject } from '@angular/core';
    import { SeoService } from './common/services/seo.service';
    import { HeaderComponent } from './common/header/header.component';
    import { RouterOutlet } from '@angular/router';
    import { FooterComponent } from './common/footer/footer.component';

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css'],
      imports: [
        HeaderComponent,
        RouterOutlet,
        FooterComponent,
      ],
    })
    export class AppComponent implements OnInit {
      readonly title = 'pnb-cards';

      private readonly seo = inject(SeoService);

      ngOnInit(): void {
        this.seo.setDefaultTags({
          title: 'PNB Credit Cards | UPI-enabled RuPay cards with rewards and security',
          description:
            'Apply for Punjab National Bank RuPay credit cards with UPI support, instant approvals, premium rewards, and secure digital payments.',
          keywords: [
            'PNB credit cards',
            'RuPay UPI card',
            'Punjab National Bank cards',
            'UPI on credit card',
            'PNB rewards',
          ],
          canonicalUrl: 'https://pnb-cards.example.com/',
          imageUrl: 'https://pnb-cards.example.com/assets/images/banner1.webp',
          twitterHandle: '@pnbcards',
        });

        this.seo.attachStructuredData({
          '@context': 'https://schema.org',
          '@type': 'FinancialService',
          name: 'Punjab National Bank Credit Cards',
          url: 'https://pnb-cards.example.com/',
          logo: 'https://pnb-cards.example.com/assets/icons/pnb-icon.jpg',
          description:
            'Punjab National Bank credit cards with UPI support, instant approval, and secure digital payments.',
          brand: {
            '@type': 'Brand',
            name: 'Punjab National Bank',
          },
          sameAs: [
            'https://www.facebook.com/pnb',
            'https://www.twitter.com/pnb',
            'https://www.linkedin.com/company/punjab-national-bank',
          ],
          offers: {
            '@type': 'Offer',
            availability: 'https://schema.org/InStock',
            priceCurrency: 'INR',
            price: '0.00',
            url: 'https://pnb-cards.example.com/',
          },
        });
      }
    }