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

single-spa-angular

Package Overview
Dependencies
Maintainers
13
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

single-spa-angular - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

20

lib/single-spa-angular.js

@@ -22,2 +22,3 @@ "use strict";

ApplicationRef: null,
NgZone: null,
domElementGetter: null // only optional if you provide a domElementGetter as a custom prop

@@ -59,2 +60,17 @@

return Promise.resolve().then(function () {
// In order for multiple Angular apps to work concurrently on a page, they each need a unique identifier.
opts.zoneIdentifier = "single-spa-angular:".concat(props.name || props.appName);
if (opts.NgZone) {
// This is a hack, since NgZone doesn't allow you to configure the property that identifies your zone.
// See https://github.com/PlaceMe-SAS/single-spa-angular-cli/issues/33,
// https://github.com/CanopyTax/single-spa-angular/issues/47,
// https://github.com/angular/angular/blob/a14dc2d7a4821a19f20a9547053a5734798f541e/packages/core/src/zone/ng_zone.ts#L144,
// and https://github.com/angular/angular/blob/a14dc2d7a4821a19f20a9547053a5734798f541e/packages/core/src/zone/ng_zone.ts#L257
opts.NgZone.isInAngularZone = function () {
// @ts-ignore
return window.Zone.current.get(opts.zoneIdentifier) === true;
};
}
opts.routingEventListener = function (evt) {

@@ -92,2 +108,6 @@ /* When popstate and hashchange events occur, single-spa delays them in order to

return opts.angularPlatform.bootstrapModule(opts.mainModule).then(function (module) {
if (opts.NgZone) {
module.injector.get(opts.NgZone)._inner._properties[opts.zoneIdentifier] = true;
}
opts.bootstrappedModule = module;

@@ -94,0 +114,0 @@

2

package.json
{
"name": "single-spa-angular",
"version": "2.1.0",
"version": "2.2.0",
"description": "Helpers for building single-spa applications which use Angular 2",

@@ -5,0 +5,0 @@ "main": "lib/single-spa-angular.js",

@@ -9,2 +9,3 @@ const defaultOpts = {

ApplicationRef: null,
NgZone: null,
domElementGetter: null, // only optional if you provide a domElementGetter as a custom prop

@@ -48,2 +49,17 @@ };

return Promise.resolve().then(() => {
// In order for multiple Angular apps to work concurrently on a page, they each need a unique identifier.
opts.zoneIdentifier = `single-spa-angular:${props.name || props.appName}`;
if (opts.NgZone) {
// This is a hack, since NgZone doesn't allow you to configure the property that identifies your zone.
// See https://github.com/PlaceMe-SAS/single-spa-angular-cli/issues/33,
// https://github.com/CanopyTax/single-spa-angular/issues/47,
// https://github.com/angular/angular/blob/a14dc2d7a4821a19f20a9547053a5734798f541e/packages/core/src/zone/ng_zone.ts#L144,
// and https://github.com/angular/angular/blob/a14dc2d7a4821a19f20a9547053a5734798f541e/packages/core/src/zone/ng_zone.ts#L257
opts.NgZone.isInAngularZone = function() {
// @ts-ignore
return window.Zone.current.get(opts.zoneIdentifier) === true;
}
}
opts.routingEventListener = function(evt) {

@@ -86,2 +102,5 @@ /* When popstate and hashchange events occur, single-spa delays them in order to

.then(module => {
if (opts.NgZone) {
module.injector.get(opts.NgZone)._inner._properties[opts.zoneIdentifier] = true;
}
opts.bootstrappedModule = module;

@@ -88,0 +107,0 @@ if (opts.ApplicationRef) {

Sorry, the diff of this file is not supported yet

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