Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-inline-svg

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-inline-svg - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

lib/inline-svg.directive.d.ts

4

lib/index.d.ts

@@ -1,2 +0,4 @@

import InlineSVGDirective from './inline-svg';
import InlineSVGDirective from './inline-svg.directive';
export { InlineSVGDirective };
export declare class InlineSVGModule {
}
"use strict";
var inline_svg_1 = require('./inline-svg');
exports.InlineSVGDirective = inline_svg_1.default;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require('@angular/core');
var http_1 = require('@angular/http');
var inline_svg_directive_1 = require('./inline-svg.directive');
exports.InlineSVGDirective = inline_svg_directive_1.default;
var svg_cache_service_1 = require('./svg-cache.service');
var InlineSVGModule = (function () {
function InlineSVGModule() {
}
InlineSVGModule = __decorate([
core_1.NgModule({
declarations: [inline_svg_directive_1.default],
imports: [http_1.HttpModule],
exports: [inline_svg_directive_1.default],
providers: [svg_cache_service_1.default]
}),
__metadata('design:paramtypes', [])
], InlineSVGModule);
return InlineSVGModule;
}());
exports.InlineSVGModule = InlineSVGModule;
{
"name": "ng2-inline-svg",
"version": "0.5.0",
"version": "0.6.0",
"description": "Angular 2 directive for inserting an SVG inline within an element.",

@@ -37,13 +37,13 @@ "repository": {

"peerDependencies": {
"@angular/core": "^2.0.0-rc.4",
"@angular/http": "^2.0.0-rc.4",
"@angular/platform-browser": "^2.0.0-rc.4",
"@angular/core": "^2.0.0-rc.5",
"@angular/http": "^2.0.0-rc.5",
"@angular/platform-browser": "^2.0.0-rc.5",
"rxjs": "5.0.0-beta.6"
},
"devDependencies": {
"@angular/common": "^2.0.0-rc.4",
"@angular/compiler": "^2.0.0-rc.4",
"@angular/core": "^2.0.0-rc.4",
"@angular/http": "^2.0.0-rc.4",
"@angular/platform-browser": "^2.0.0-rc.4",
"@angular/common": "^2.0.0-rc.5",
"@angular/compiler": "^2.0.0-rc.5",
"@angular/core": "^2.0.0-rc.5",
"@angular/http": "^2.0.0-rc.5",
"@angular/platform-browser": "^2.0.0-rc.5",
"rxjs": "5.0.0-beta.6",

@@ -50,0 +50,0 @@ "tslint": "^3.14.0",

@@ -24,14 +24,17 @@ # ng2-inline-svg

Make sure to add `HTTP_PROVIDERS` to your list of bootstrap providers:
If you'd like to use a module, add `InlineSVGModule` to your list of app module imports:
```typescript
import { bootstrap } from '@angular/platform-browser-dynamic';
import { HTTP_PROVIDERS } from '@angular/http';
import { InlineSVGModule } from 'ng2-inline-svg';
import { AppComponent } from './app/app.component';
bootstrap(App, [HTTP_PROVIDERS]);
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, InlineSVGModule],
bootstrap: [AppComponent]
})
class AppModule {}
```
Import the component and add it to the list of directives on your component:
Alternatively, you can directly add the directive to your component's decorator (making sure to also
provide either `HTTP_PROVIDERS` or `HttpModule` in your app module):

@@ -38,0 +41,0 @@ ```typescript

@@ -1,3 +0,15 @@

import InlineSVGDirective from './inline-svg';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import InlineSVGDirective from './inline-svg.directive';
import SVGCache from './svg-cache.service';
export { InlineSVGDirective };
@NgModule({
declarations: [InlineSVGDirective],
imports: [HttpModule],
exports: [InlineSVGDirective],
providers: [SVGCache]
})
export class InlineSVGModule {}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc