【问题标题】:Angularjs module error in jsfiddle but works fine in plnkrjsfiddle中的Angularjs模块错误,但在plnkr中工作正常
【发布时间】:2017-01-09 06:35:02
【问题描述】:

这里我有 https://jsfiddle.net/1nivas/6g4hxcof/ 不工作
这是https://plnkr.co/edit/u49sV6xhhFOr7bffvLWt?p=preview 中相同的 angularjs 模板,它工作正常。
你能看看并告诉我有什么问题吗?我想使用 jsfiddle 因为它看起来不错。我以前从未使用过 jsfiddle

// the main (app) module
var app = angular.module("myApp", []);

// add a controller
app.controller("myCtrl", function($scope) {
    $scope.msg = "hello world";
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<body ng-app="myApp" ng-controller="myCtrl">
    {{msg}}
</body>

【问题讨论】:

    标签: jsfiddle


    【解决方案1】:

    在你的小提琴中包含 AngularJS 1.4.8

    snapshot attached here

    【讨论】:

    • 谢谢。你知道 no wrap - in : 和 no wrap - in : 有什么区别吗?以及如何添加自定义角度版本?
    • no wrap in : javascipt 代码放在 head 部分。 中没有换行:javascipt 代码放在正文部分
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多