New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ngx-source

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-source

Angular resource loader

latest
Source
npmnpm
Version
18.0.0
Version published
Maintainers
1
Created
Source

ngx source

angular source, can load js and css in runtime

npm version GitHub issues GitHub stars GitHub license

Installation

Install through npm:

npm install --save ngx-source

use in one of your apps components:

import { Component, OnInit } from '@angular/core';
import { Source, SourceType, NgxSourceService } from 'ngx-source';

@Component({
  template: 'your-component',
})
export class YourComponent implements OnInit {
  constructor(private ngxSourceService: NgxSourceService) {
    this.ngxSourceService.addSources([
      new Source('yourJsName', '/js/yourJsFile.js', SourceType.SCRIPT),
      new Source('yourCssName', '/css/yourCssFile.js', SourceType.STYLE),
    ]);
  }

  async ngOnInit() {
    await this.ngxSourceService.loadBySourceName('yourJsName');
    await this.ngxSourceService.loadBySourceName('yourCssName');

    // or

    await this.ngxSourceService.loadBySourceNames('yourJsName', 'yourCssName');
  }
}

Keywords

ngx

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts