Socket
Socket
Sign inDemoInstall

@ioffice/angular-ts

Package Overview
Dependencies
0
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

22

CHANGELOG.md

@@ -1,6 +0,22 @@

# Change Log
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project
adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.1.0] - May 18, 2018
- Added `loadNgModuleNoDefault` so that ngModules may be exported with their name ending in
`Module`. This is for projects where the linter prohibits the use of `export default`.
- Fixed types for `ngRegister`: `name` and `requires` properties.
## [1.0.2] - May 1, 2018
- Added file to npm ignore.
## [1.0.1] - March 27, 2018

@@ -10,7 +26,11 @@ - Verifying tc-build process.

## [1.0.0] - March 27, 2018
- Published to npm under the `@ioffice` scope
[Unreleased]: https://github.com/ioffice/angular-ts/compare/1.1.0...HEAD
[1.1.0]: https://github.com/ioffice/angular-ts/compare/1.0.2...1.1.0
[1.0.2]: https://github.com/ioffice/angular-ts/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/ioffice/angular-ts/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/ioffice/angular-ts/compare/v0.3.0...1.0.0

4

index.d.ts

@@ -6,3 +6,3 @@ import { Inject, inject } from './injectable';

import { mix, isinstance } from './mix';
import { loadNgModule } from './loadNgModule';
export { inject, Inject, INgComponentOptions, NgComponent, NgOnInit, NgDoCheck, NgOnChanges, NgOnDestroy, NgPostLink, Directive, ngRegister, mix, isinstance, loadNgModule };
import { loadNgModule, loadNgModuleNoDefault } from './loadNgModule';
export { inject, Inject, INgComponentOptions, NgComponent, NgOnInit, NgDoCheck, NgOnChanges, NgOnDestroy, NgPostLink, Directive, ngRegister, mix, isinstance, loadNgModule, loadNgModuleNoDefault };

@@ -17,1 +17,2 @@ "use strict";

exports.loadNgModule = loadNgModule_1.loadNgModule;
exports.loadNgModuleNoDefault = loadNgModule_1.loadNgModuleNoDefault;

@@ -20,2 +20,8 @@ /**

declare function loadNgModule(callback: any): any[];
export { loadNgModule };
/**
* Does the exact same thing as `loadNgModule` with the exception that it requires the module
* file to export a single NgModule object with its name ending in `Module`. This is for
* files that follow the convention of not using default exports.
*/
declare function loadNgModuleNoDefault(callback: any): any[];
export { loadNgModule, loadNgModuleNoDefault };

@@ -33,1 +33,22 @@ "use strict";

exports.loadNgModule = loadNgModule;
/**
* Does the exact same thing as `loadNgModule` with the exception that it requires the module
* file to export a single NgModule object with its name ending in `Module`. This is for
* files that follow the convention of not using default exports.
*/
function loadNgModuleNoDefault(callback) {
return ['$q', '$ocLazyLoad', function ($q, $ocLazyLoad) {
return $q(function (resolve) {
callback(function (file) {
var modules = Object.keys(file).filter(function (key) { return key.endsWith('Module'); });
if (modules.length !== 1) {
throw new Error('Only one angularJS module should be exported in a lazy module');
}
var module = file[modules[0]];
$ocLazyLoad.load({ name: module.name });
resolve(module.name);
});
});
}];
}
exports.loadNgModuleNoDefault = loadNgModuleNoDefault;

@@ -12,5 +12,5 @@ "use strict";

}
var parent_1 = Object.getPrototypeOf(mixin.prototype);
if (parent_1) {
_addBase(clazz, parent_1.constructor);
var parent = Object.getPrototypeOf(mixin.prototype);
if (parent) {
_addBase(clazz, parent.constructor);
}

@@ -17,0 +17,0 @@ }

@@ -12,4 +12,4 @@ /// <reference types="angular" />

app: ng.IModule;
requires: Function;
name: Function;
requires: string[];
name: string;
provider: Function;

@@ -16,0 +16,0 @@ service: Function;

@@ -30,4 +30,4 @@ "use strict";

var methods = [
'requires',
'name',
// 'requires',
// 'name',
'provider',

@@ -58,3 +58,2 @@ // 'factory',

}
// Casting to `any` since we are relying on access by index
(_a = _this.app)[method].apply(_a, args);

@@ -61,0 +60,0 @@ return _this;

{
"name": "@ioffice/angular-ts",
"version": "1.0.2",
"version": "1.1.0",
"description": "An approach to using ES6 classes in Angular JS 1.x with Typescript",

@@ -5,0 +5,0 @@ "license": "MIT",

# Angular TS
[![NPM Version](https://img.shields.io/npm/v/angular-ts.svg)](https://www.npmjs.com/package/angular-ts)
[![NPM Version](https://img.shields.io/npm/v/@ioffice/angular-ts.svg)](https://www.npmjs.com/package/@ioffice/angular-ts)
[![License](https://img.shields.io/npm/l/angular-ts.svg)](LICENSE)

@@ -5,0 +5,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc