新手入门问题,{{name}}直接原样输出了
angularjs吧
全部回复
仅看楼主
level 2
胡小帅plus 楼主
代码已上图,设置控制器之后,直接页面上原样输出了
2016年07月31日 12点07分 1
level 2
胡小帅plus 楼主
求各位老手予以帮助
2016年07月31日 12点07分 2
level 3
ng-app="myApp"//这个地方最好不要是ng-app=""
var app = angular.module('myApp', []);
app.controller('firstController', function($scope) {
$scope.name = "John Doe";
});
你试一下。
2016年08月01日 10点08分 3
level 11
Controller 沒有 inject到module
2016年08月05日 13点08分 4
level 1
你这个是引用路径问题,在../../ 前面在加个../
2017年04月01日 06点04分 6
level 2
楼主,在吗
2017年04月05日 10点04分 7
level 4
模块没写 控制器也没写 很正常
2017年05月02日 17点05分 8
level 5
ng-app后面不要跟空的字符串
2017年06月29日 13点06分 9
level 5
ng-controller="FirstController"
2017年06月29日 13点06分 10
level 5
angular.module("myApp",[]).controller("FirstController",["$scope",function($scope){$scope.name="张三"}])
2017年06月29日 13点06分 11
1