【发布时间】:2016-10-29 07:55:44
【问题描述】:
我们在Asp.Net Core 中创建AngularJS 2 应用程序。并且使用的模板不支持AngularJS 2。问题是 Layout.Init() 函数未初始化。我尝试在AngularJS 2 组件的OnInit() 事件中调用Layout.Init() 函数。然后我得到错误:
我的代码:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ds-left-sidebar',
template: require('./ds-left-sidebar.component.html')
})
export class LeftSidebarComponent implements OnInit {
ngOnInit() {
Layout.init();
}
}
有什么建议吗?感谢您的回答。
【问题讨论】:
-
这里的布局是什么?
-
@micronyks,布局是
javascriptlayout.js中的函数
标签: c# angular asp.net-core