ng2-inline-svg
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -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 {} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27244
16
583
76