npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-substance

v1.0.0-7

Published

Angular Substance is a library to integrate Substance in angular projects.

Readme

Angular Substance

Table of contents

About

Angular Substance is a library to integrate Substance in angular projects. I use Texture as basement for a Substance Editor.

This project based on

Getting started:

npm i --save angular-substance

Run Demo

Start a Backend

  • Run npm run server for the http REST backend server deliver fromjson data
  • Run npm run dar-server for the http DAR backend server deliver from DAR archive

Start Demo Project

  • Run npm start for the demo project

Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Documentation

Integrate Angular Substance Module

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularSubstanceModule } from 'angular-substance';

@NgModule({
    imports: [
        BrowserModule,
        AngularSubstanceModule
    ]
})
export class AppModule { }

Module Interface

import { Component } from '@angular/core';
import { StorageType } from 'angular-substance';

@Component({
  selector: 'app-component',
  template: `<esl-angular-substance
[               [archiveId]="archiveId" 
                [storageType]="storageType" 
                [storageUrl]="storageUrl">
            </esl-angular-substance>`
})
export class AppComponent {
    public archiveId: string = 'elife-32671';
    public storageType: StorageType = StorageType.HTTP;
    public storageUrl: string ='api/archives';
}

Properties

Property | Type | Default | Description ------------ | ------------- | ------------- | ------------- archiveId | string | none | Your Archive name or id to find in the backend storage. storageType | StorageType | StorageType.HTTP | The storage client you use to save documents in the backend. Normally you want save your documents in a server backend sending over http. You can use the Substance http storage client (StorageType.HTTP), As well you can use Angular http storage client (StorageType.ANGULAR_HTTP) or your own implementation of this. storageUrl | string | api/archives |Url address for your backend service defaultDataFolder | string | ./assets/data/ | Public folder with dar archives if you use VFS

CSS and Fonts Assets

Note: you need font-awesome

Update your .angular.json file in build like so...

"assets": [
  ...
  {
    "glob": "**/*",
    "input": "./node_modules/angular-substance/assets",
    "output": "./assets/"
  }
],

And load assets in your index.html

  <style>
    @import 'assets/angular-substance.css';
    @import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css';
    body { overflow: hidden; }
    html, body { height: 100%; }
    .sc-app {
      height: 100%;
    }
  </style>

Use custom http service for your API

  • Use StorageType.ANGULAR_HTTP for property storageType in the component setup
  • Write an Custom Service with implementation of DarStorageClient
  • Inject your custom service instate of AngularHttpStorageClient in your App Module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularSubstanceModule, AngularHttpStorageClient } from 'angular-substance';

@NgModule({
    imports: [
        BrowserModule,
        AngularSubstanceModule
    ],
    providers: [
        [{ provide: AngularHttpStorageClient, useClass: CustomStorageClientService }]
    ],
})
export class AppModule { }

Setup for VFS Storage

  • Add vfs as lib to windows.vfs = your.vfs , See demo index.html
  • Use StorageType.VFS for property storageType and adjust in the component setup defaultDataFolder, pointing to your dar archives
@Component({
  ...
  template: `<esl-angular-substance
                 ...
                [storageType]="storageType"
                [defaultDataFolder]="defaultDataFolder">
            </esl-angular-substance>`
})
export class AppComponent {
    ...
    public storageType: StorageType = StorageType.VFS;
    public defaultDataFolder: string = './assets/data/';

}

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

License

MIT