這裏是我的角度代碼:
angular.module('TM', [])
.controller('protocolCtrl', function(){
this.categoryText = 'Now looking at the protocol part'
})
.controller('categoryCtrl', function(){
this.protocolText = 'Now looking at the category part'
})
.directive('modalDirective', function(){
return {
restrict: 'E',
scope: {
list: '='
},
template: ['<div id="modal" class="modal fade" role="dialog">',
'<div class="modal-dialog">',
'</div>',
'</div>'].join('')
}
});
如果我直接在HTML文件中使用HTML模板,它顯示,而不是其他。
的錯誤是希望真的不起眼,但是任何幫助表示讚賞。
你有沒有在僅僅使用用戶界面,引導模式採取看看嗎? https://angular-ui.github.io/bootstrap/它會爲你做這一切。 – mikeswright49
你的角JS不會在你的小提琴中加載。 404 –
工作正常..只需要修理你的小提琴。改爲使用此鏈接.. https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js這裏是一個演示.. https://jsfiddle.net/DTcHh/10131/ –