
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
angular2-aspnet
Advanced tools
If you just want to use this package, then you don't have to build it. Instead, just grab the prebuilt package from NPM:
npm install angular2-aspnet
The rest of this file is notes for anyone contributing to this package itself.
## How to build
Run the following:
npm install
npm run prepublish
Requirements:
tsc
installed globally (via npm install -g typescript
)This package is intended to be consumable both on the server in Node.js, and on the client. Also, it's written in TypeScript, which neither of those environments knows natively, but the TypeScript type definitions need to get delivered with the package so that developers get a good IDE experience when consuming it.
The build process is therefore:
Compile the TypeScript to produce the development-time (.d.ts) and server-side (.js) artifacts
tsc
reads tsconfig.json
and is instructed to compile all the .ts
files in src/
. It produces a corresponding
structure of .js
and .d.ts
files in dist/
.
When a developer consumes the resulting package (via npm install angular2-aspnet
),
angular2
will be installed, because this package's dependency on it is declared as a
peerDependency
. This means it will work with whatever (compatible) version of angular2
is already installed.main
configuration in package.json
means the developer can use a standard
import
statement to consume this package (i.e., import * from 'angular2-aspnet';
in either JS or TS files).typings
configuration in package.json
means
the IDE will use the corresponding .d.ts
file as type metadata for the variable imported that way.Use the SystemJS builder to produce the client-side artifacts
build.js
uses the SystemJS Builder API to combine files in dist/
into .js
files ready for use in client-side
SystemJS environments, and puts them in bundles/
. The bundle files contain System.register
calls so that any
other part of your client-side code that tries to import angular2-aspnet
via SystemJS will get that module at runtime.
To make it work in an application:
bundles/
to some location where it will
be served to the client<script>
tag that loads SystemJS itself, and above the <script>
tag that makes the first call to
System.import
, have a <script>
tag that loads the desired angular2-aspnet.js
bundle fileFor an example, see https://github.com/aspnet/NodeServices/tree/master/samples/angular/MusicStore
Of course, you can also bundle the angular2-aspnet.js
file into a larger SystemJS bundle if you want to combine
it with the rest of the code in your application.
Currently, this build system does not attempt to send sourcemaps of the original TypeScript to the client. This could be added if a strong need emerges.
FAQs
Helpers for Angular 2 apps built on ASP.NET
The npm package angular2-aspnet receives a total of 8 weekly downloads. As such, angular2-aspnet popularity was classified as not popular.
We found that angular2-aspnet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.