我正在研究 Angular 4。我有一个 HTML 页面,其中包含一些数据。
我想使用 JSON 格式的角度数据绑定将 HTML 数据获取到打字稿。
通过网络搜索后,我也在我的中添加了表单模块appmodule.ts。
我尝试过使用 HTML DOM。但我遇到了以下错误
任何人都可以帮助如何使用角度绑定,以便如果我更改数据,它也应该在后端更改
以及如何通过从 HTML 获取到 Typescript 来加载数据。
Thanks in advance
import {
Component,
OnInit,
ViewChild,
ElementRef,
Input,
Output,
EventEmitter
} from '@angular/core';
export class SystemDynamicsComponent implements OnInit {
system: any;
@ViewChild('diagramDiv')
private diagramRef: ElementRef;
@Input()
get model(): go.Model {
return diagram.model;
console.log('get', diagram.model);
}
set model(val: go.Model) {
diagram.model = val;
console.log('set', diagram.model);
}
// @Output()
modelChanged = new EventEmitter < …Run Code Online (Sandbox Code Playgroud)我在网上搜索过,但我没有找到任何解决办法.
我也希望括号下划线.
a {
text-decoration: underline;
}Run Code Online (Sandbox Code Playgroud)
<a href='#'>hhh(9)</a>Run Code Online (Sandbox Code Playgroud)