@2sic.com/dnn-sxc-angular
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,2 @@ | ||
export { DnnSxcModule } from "./dnn.sxc.module"; | ||
export { AppComponent as DnnAppComponent } from './app.component'; | ||
@@ -5,2 +6,2 @@ export { DevContext } from './context/dev-context'; | ||
export { Data } from './sxc/data'; | ||
export { DnnInterceptor } from './http/interceptor.provider'; | ||
export { DnnInterceptor } from './http/dnn.interceptor'; |
"use strict"; | ||
exports.__esModule = true; | ||
var dnn_sxc_module_1 = require("./dnn.sxc.module"); | ||
exports.DnnSxcModule = dnn_sxc_module_1.DnnSxcModule; | ||
var app_component_1 = require("./app.component"); | ||
@@ -11,3 +13,3 @@ exports.DnnAppComponent = app_component_1.AppComponent; | ||
exports.Data = data_1.Data; | ||
var interceptor_provider_1 = require("./http/interceptor.provider"); | ||
exports.DnnInterceptor = interceptor_provider_1.DnnInterceptor; | ||
var dnn_interceptor_1 = require("./http/dnn.interceptor"); | ||
exports.DnnInterceptor = dnn_interceptor_1.DnnInterceptor; |
{ | ||
"_args": [ | ||
[ | ||
{ | ||
"raw": "@2sic.com/dnn-sxc-angular@1.0.0", | ||
"scope": "@2sic.com", | ||
"escapedName": "@2sic.com%2fdnn-sxc-angular", | ||
"name": "@2sic.com/dnn-sxc-angular", | ||
"rawSpec": "1.0.4", | ||
"spec": "1.0.4", | ||
"type": "version" | ||
}, | ||
"C:\\Projects\\New folder" | ||
], | ||
[ | ||
{ | ||
"raw": "@2sic.com/dnn-sxc-angular", | ||
"scope": "@2sic.com", | ||
"escapedName": "@2sic.com%2fdnn-sxc-angular", | ||
"name": "@2sic.com/dnn-sxc-angular", | ||
"rawSpec": "", | ||
"spec": "latest", | ||
"type": "tag" | ||
}, | ||
"C:\\Users\\2cb\\Documents\\app-dnn-sxc-angular-dev" | ||
] | ||
], | ||
"_from": "@2sic.com/dnn-sxc-angular", | ||
"_id": "@2sic.com/dnn-sxc-angular@1.0.4", | ||
"_inCache": true, | ||
"_location": "/@2sic.com/dnn-sxc-angular", | ||
"_nodeVersion": "7.7.3", | ||
"_npmOperationalInternal": { | ||
"host": "s3://npm-registry-packages", | ||
"tmp": "tmp/dnn-sxc-angular-1.0.4.tgz_1504278074805_0.18234755541197956" | ||
}, | ||
"_npmUser": { | ||
"name": "christophbuehler", | ||
"email": "christoph@cbuehler.li" | ||
}, | ||
"_npmVersion": "4.1.2", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"raw": "@2sic.com/dnn-sxc-angular", | ||
"scope": "@2sic.com", | ||
"escapedName": "@2sic.com%2fdnn-sxc-angular", | ||
"name": "@2sic.com/dnn-sxc-angular", | ||
"rawSpec": "", | ||
"spec": "latest", | ||
"type": "tag" | ||
}, | ||
"_requiredBy": [ | ||
"#DEV:/", | ||
"#USER" | ||
], | ||
"_resolved": "https://registry.npmjs.org/@2sic.com/dnn-sxc-angular/-/dnn-sxc-angular-1.0.4.tgz", | ||
"_shasum": "3b5924b10515bdadcb46d6fa0257181698d5b560", | ||
"_shrinkwrap": null, | ||
"_spec": "@2sic.com/dnn-sxc-angular", | ||
"_where": "C:\\Users\\2cb\\Documents\\app-dnn-sxc-angular-dev", | ||
"author": "", | ||
@@ -78,3 +19,3 @@ "bugs": { | ||
"shasum": "fae4a3b33304545c0c5ddf9fb1131cdc91086cfc", | ||
"tarball": "https://registry.npmjs.org/@2sic.com/dnn-sxc-angular/-/sxc-angular-1.0.3.tgz" | ||
"tarball": "https://registry.npmjs.org/@2sic.com/dnn-sxc-angular/-/sxc-angular-1.2.0.tgz" | ||
}, | ||
@@ -96,2 +37,3 @@ "gitHead": "08eb8fc3226c22f147609bffd9d7090c26a48f7e", | ||
"copy:dist": "cpx \"{,!(node_modules)/**/}*.*\" \"../app-dnn-sxc-angular-dev/node_modules/@2sic.com/dnn-sxc-angular\" -w", | ||
"copy:2dm": "cpx \"{,!(node_modules)/**/}*.*\" \"../app-Directory/node_modules/@2sic.com/dnn-sxc-angular\" -w -v", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
@@ -101,3 +43,3 @@ "develop": "tsc -watch" | ||
"typings": "index.d.ts", | ||
"version": "1.1.0" | ||
"version": "1.2.0" | ||
} |
@@ -8,26 +8,61 @@ # dnn-sxc-angular | ||
1. automatically provides all important dnn-parameters (module ID, security token, etc.) to angular | ||
2. overrides the HttpClient service to automatically use these parameters | ||
2. adds an Http Interceptor for the HttpClient which automatically applies these parameters to all requests | ||
It uses observables to make it happen, thereby avoiding timing / async problems common in this scenario. | ||
## How to get this package | ||
It's published on [npm](https://www.npmjs.com/package/@2sic.com/dnn-sxc-angular), so the most common way is to get it using npm install: | ||
* `npm install -d @2sic.com/dnn-sxc-angular` | ||
## How To Use | ||
It's published on NPM, so the most common way is to | ||
Make sure your application uses the Http Interceptor by adding the important providers to app.module.ts, so you'll need to add: | ||
1. get it using `npm install -d @2sic.com/dnn-sxc-angular` | ||
1. make sure your application uses the enhanced HttpClient by adding the provider to main.ts, so you'll need to add | ||
`...todo` | ||
and | ||
`...todo` | ||
1. make sure initializations happen, by changing your app.component.ts from | ||
`todo` | ||
```typescript | ||
import { DnnSxcModule } from '@2sic.com/dnn-sxc-angular' | ||
``` | ||
and this module to the @NgModule - here's an example from the [Angular Directory App](https://github.com/2sic/app-directory-angular/blob/master/src/app/app.module.ts), yours will look a bit different. | ||
```typescript | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
DnnSxcModule, // DnnSxc module ensures all connectors are available | ||
HttpClientModule, // important - this changed in Angular 4.3 | ||
BrowserModule, | ||
FormsModule, | ||
DirectoryModule, | ||
RouterModule.forRoot(appRoutes) | ||
], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } | ||
``` | ||
Now, make sure initializations happen, by changing your app.component.ts from | ||
```typescript | ||
export class AppComponent {...} | ||
``` | ||
to | ||
`todo` | ||
That's it. | ||
```typescript | ||
export class AppComponent extends DnnAppComponent { | ||
constructor( | ||
element: ElementRef, | ||
context: Context, | ||
) { | ||
super(element, context); | ||
} | ||
} | ||
``` | ||
Again you can compare it with the example from the [Angular Directory App](https://github.com/2sic/app-directory-angular/blob/master/src/app/app.component.ts). That's it! | ||
**build solution for npm** | ||
- change version number | ||
- npm publish | ||
## Internal Notes | ||
* read [npm instructions](npm-instructions) to see how to publish a release |
@@ -0,1 +1,2 @@ | ||
export { DnnSxcModule } from "./dnn.sxc.module"; | ||
export { AppComponent as DnnAppComponent } from './app.component' | ||
@@ -5,2 +6,2 @@ export { DevContext } from './context/dev-context'; | ||
export { Data } from './sxc/data'; | ||
export { DnnInterceptor } from './http/interceptor.provider'; | ||
export { DnnInterceptor } from './http/dnn.interceptor'; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
60
67
49558
1115