Encountering challenges while trying to integrate the sax parser [parser.ts] into my project.
import sax = require("sax");
export class MyParser {
//my parser code
}
When attempting to utilize it [app.component.ts]:
import {MyParser} from './parser'
...
constructor(private http: Http, private parser: MyParser) {}
An error surfaces:
Evaluating http://localhost:3000/sax
This indicates that SystemJS is unable to locate the module. Despite sax being installed in node_modules and outlined in package.json. Typings were acquired using
typings install --ambient sax
However, numerous duplicate identifier warnings persist even though my tsconfig.json excludes
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
In his examples, isaacs employs code such as this
tag.parent
tag.children
This functionality isn't supported by the typing (d.ts).
If anyone has successfully implemented sax with TS and ng2, your insights would be greatly appreciated!