This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class UvUtilService { | |
| constructor() { } | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
| import { HomeComponent } from './home.component'; | |
| import { HomeService } from './home.service'; | |
| import * as globalmocks from '../globalmocks'; // import everything which is present in globalmocks | |
| // Function to reset to globalmocks. | |
| const resetToGlobalMocks = () => { | |
| globalmocks.HomeService.searchSubscriber$ = { | |
| subscribe: (callback) => { | |
| callback('Yuvraj'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, OnDestroy, Input } from '@angular/core'; | |
| import { Subscription } from 'rxjs/internal/Subscription'; | |
| import uvData from './../../data/data.json'; | |
| import { HomeService } from './home.service'; | |
| @Component({ | |
| selector: 'app-home', | |
| templateUrl: './home.component.html', | |
| styleUrls: ['./home.component.scss'] | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use shollow copy of your app data. | |
| export const appData = { | |
| defaultOrderIndex: 0, | |
| sortOrders: [{ | |
| type: 'string', | |
| name: 'Title', | |
| sortAttribute: 'title' | |
| }] | |
| // Remaining test data should be added here. | |
| } |
NewerOlder