Socket
Book a DemoInstallSign in
Socket

@auscope/angular2parse

Package Overview
Dependencies
Maintainers
8
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auscope/angular2parse

Fork of articode repo for Angular v20

20.0.2
latest
Source
npmnpm
Version published
Weekly downloads
99
6.45%
Maintainers
8
Weekly downloads
 
Created
Source

angular2parse

Parse util for angular expressions: html string -> angular temaplte

install

npm install angular2parse

// app.module.ts
@NgModule({
  imports: [Angular2ParseModule, ...],
  // ...
})
class AppModule {}

usage

import { Parse } from 'angular2parse';

@Injectable()
class MyService {
  constructor(private parser: Parse) {}
  
  parseAngularString() {
    const expression = `{
	positions: track.positions,
	cornerType: getCornerType(),
	material: track.color,
	width : 200000.0 }`;

   const expressionEvalFn = this.parser.eval(expression)
  
   const context = {
      getCornerType: () => 'value',
      track: {
          positions: [1,2,3],
          color: 'red',
        }
      }
   };
    
   const result = expressionEvalFn(context);
   console.log(result);
   // {positions: [1,2,3], cornerType: 'value', material: 'red', width: 2000}
  
}

FAQs

Package last updated on 18 Aug 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.