Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Angularjs 排除不在工作状态下工作_Angularjs - Fatal编程技术网

Angularjs 排除不在工作状态下工作

Angularjs 排除不在工作状态下工作,angularjs,Angularjs,我创建了一个名为first的指令。如下 <div first> <p>aaaaaa11111</p> </div> AAAAA11111 棱角状 var testdirective = angular.module("testdirective",[]); testdirective.directive('first', function() { return { transclude: t

我创建了一个名为first的指令。如下

 <div first>
        <p>aaaaaa11111</p>
</div>

AAAAA11111

棱角状

var testdirective = angular.module("testdirective",[]);

testdirective.directive('first', function()
{
    return
    {
        transclude: true,
        template: '<div> This is my directive content</div>'
    }
});
var testdirective=angular.module(“testdirective”,[]);
指令('first',function()
{
返回
{
是的,
模板:“这是我的指令内容”
}
});

运行文件“aaaaaa 11111

”时,内容未显示y….

您使用了错误的模板()

模板:“这是我的指令内容”

您使用了错误的模板()

模板:“这是我的指令内容”

您使用了错误的模板()

模板:“这是我的指令内容”

您使用了错误的模板()

模板:“这是我的指令内容”

您没有在模板中使用ng trasclude指令。 以下是更新代码:

HTML

<div ng-app="testdirective">
    <div first>
        <p>aaaaaa11111</p>
    </div>
</div>

AAAAA11111

JavaScript

var testdirective = angular.module("testdirective",[]);
testdirective.directive('first', function() {
    return {
        transclude: true,
        template: '<div> This is my directive content<span ng-transclude></span></div>'
    }
});
var testdirective=angular.module(“testdirective”,[]);
指令('first',function(){
返回{
是的,
模板:“这是我的指令内容”
}
});
你可以结账。它有运行演示


有关更多详细信息,请查看博客。

您没有在模板中使用ng trasclude指令。 以下是更新代码:

HTML

<div ng-app="testdirective">
    <div first>
        <p>aaaaaa11111</p>
    </div>
</div>

AAAAA11111

JavaScript

var testdirective = angular.module("testdirective",[]);
testdirective.directive('first', function() {
    return {
        transclude: true,
        template: '<div> This is my directive content<span ng-transclude></span></div>'
    }
});
var testdirective=angular.module(“testdirective”,[]);
指令('first',function(){
返回{
是的,
模板:“这是我的指令内容”
}
});
你可以结账。它有运行演示


有关更多详细信息,请查看博客。

您没有在模板中使用ng trasclude指令。 以下是更新代码:

HTML

<div ng-app="testdirective">
    <div first>
        <p>aaaaaa11111</p>
    </div>
</div>

AAAAA11111

JavaScript

var testdirective = angular.module("testdirective",[]);
testdirective.directive('first', function() {
    return {
        transclude: true,
        template: '<div> This is my directive content<span ng-transclude></span></div>'
    }
});
var testdirective=angular.module(“testdirective”,[]);
指令('first',function(){
返回{
是的,
模板:“这是我的指令内容”
}
});
你可以结账。它有运行演示


有关更多详细信息,请查看博客。

您没有在模板中使用ng trasclude指令。 以下是更新代码:

HTML

<div ng-app="testdirective">
    <div first>
        <p>aaaaaa11111</p>
    </div>
</div>

AAAAA11111

JavaScript

var testdirective = angular.module("testdirective",[]);
testdirective.directive('first', function() {
    return {
        transclude: true,
        template: '<div> This is my directive content<span ng-transclude></span></div>'
    }
});
var testdirective=angular.module(“testdirective”,[]);
指令('first',function(){
返回{
是的,
模板:“这是我的指令内容”
}
});
你可以结账。它有运行演示

有关更多详细信息,请查看博客