Twitter bootstrap ng2 bootsrap没有导出的成员';TAB#u指令';
我正在处理angular2 I,我必须使用ui的选项卡。为此,我尝试使用插件 我已经写了一个演示组件Twitter bootstrap ng2 bootsrap没有导出的成员';TAB#u指令';,twitter-bootstrap,angular-ui-bootstrap,angular,angular2-directives,Twitter Bootstrap,Angular Ui Bootstrap,Angular,Angular2 Directives,我正在处理angular2 I,我必须使用ui的选项卡。为此,我尝试使用插件 我已经写了一个演示组件 import { Component, View, Inject} from 'angular2/core'; import { CORE_DIRECTIVES } from 'angular2/common'; import { TAB_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap'; // webpack ht
import { Component, View, Inject} from 'angular2/core';
import { CORE_DIRECTIVES } from 'angular2/common';
import { TAB_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';
// webpack html imports
let template = require('./tabs-demo.html');
@Component({
selector: 'tabs-demo',
template: template,
directives: [TAB_DIRECTIVES, CORE_DIRECTIVES]
})
export class TabsDemo {
private tabs:Array<any> = [
{title: 'Dynamic Title 1', content: 'Dynamic content 1'},
{title: 'Dynamic Title 2', content: 'Dynamic content 2', disabled: true}
];
private alertMe() {
setTimeout(function () {
alert('You\'ve selected the alert tab!');
});
};
}
import{Component,View,Inject}来自'angular2/core';
从“angular2/common”导入{CORE_指令};
从“ng2引导/ng2引导”导入{TAB_指令};
//网页包html导入
让template=require('./tabs demo.html');
@组成部分({
选择器:“选项卡演示”,
模板:模板,
指令:[制表符指令,核心指令]
})
导出类TabsDemo{
专用选项卡:数组
请更正我以正确运行它。似乎TAB\u指令
已重命名为TAB\u组件
。我尝试了ng2引导的0.53版
以下是我在index.html
文件中使用的有关SystemJS的配置:
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'ng2-bootstrap': {
format: 'register',
defaultExtension: 'js'
}
},
map: {
'ng2-bootstrap': 'node_modules/ng2-bootstrap'
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
</script>
System.config({
包:{
应用程序:{
格式:'寄存器',
defaultExtension:'js'
},
“ng2引导程序”:{
格式:'寄存器',
defaultExtension:'js'
}
},
地图:{
“ng2引导程序”:“节点_模块/ng2引导程序”
}
});
System.import('app/boot')
.then(null,console.error.bind(console));
希望它能帮助你,
Thierry我仍然收到错误,无法找到输入文件F:\DemoProjects\TrackMe\client\client\components\home\home.ts。这可能是gulp typescript的问题。请在我使用“ng2引导”时报告:“^0.53.0”,是的,这似乎不是与ng2引导相关的错误…好的,与我的版本相同!
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'ng2-bootstrap': {
format: 'register',
defaultExtension: 'js'
}
},
map: {
'ng2-bootstrap': 'node_modules/ng2-bootstrap'
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
</script>