Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html AngularJS:JS Fiddle无法加载资源_Html_Angularjs_Twitter Bootstrap_Angularjs Directive_Jsfiddle - Fatal编程技术网

Html AngularJS:JS Fiddle无法加载资源

Html AngularJS:JS Fiddle无法加载资源,html,angularjs,twitter-bootstrap,angularjs-directive,jsfiddle,Html,Angularjs,Twitter Bootstrap,Angularjs Directive,Jsfiddle,这是我的角度代码: 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' }) .directi

这是我的角度代码:

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('')
    }
});
angular.module('TM',[])
.controller('protocolCtrl',function(){
this.categoryText='现在查看协议部分'
})
.controller('categoryCtrl',function(){
this.protocolText='现在查看类别部分'
})
.directive('modalDirective',function(){
返回{
限制:'E',
范围:{
列表:'='
},
模板:['',
'',
'',
''。加入('')
}
});
如果我在html文件中直接使用模板html,它会显示出来,但不会显示其他内容


希望这个错误真的很小,但我们非常感谢您的帮助。

您的代码似乎很好。但你小提琴上的角环断了。当制作Angularjs提琴时,您应该从Angularjs.org网站复制CDN URL,并将其添加为JS提琴的外部资源

https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js

演示:


您有没有考虑过仅使用UI引导模式?这一切都会为你做的。你的角JS没有加载到你的小提琴中。很好。。只需要修理你的小提琴。请使用此链接。。这是一个演示。。如果你有时间-如果你也能看一看,我真的很感激:@Nilzone-,你为这个问题开始了一把小提琴吗?我现在正在复制小提琴中的错误,然后我会更新这个问题。我更新了这个问题,我现在把你和小提琴联系起来,如果你想看的话。好的,我会看一看