5 html javascript angularjs ionic-framework ionic
嗨我已经尝试了很多文章和答案来自不同的问题,但没有运气,我使用一个空白的离子项目,它在我的浏览器上运行ionic.serve也没有任何错误显示.
该{{truck}}显示在我的应用程序,而不是价值"Truck Value"
,也是{{truck}}不会永久显示它一旦我刷新浏览器闪烁.
html
<body ng-app="starter">
<div ng-controller="Ctrl">
<h2>hey {{truck}}</h2>
</div>
</body>
js
var example = angular.module('starter', ['ionic', 'ngCordova'])
...
example.controller("Ctrl", function() {
var truck = "Truck Value";
});
Run Code Online (Sandbox Code Playgroud)
example.controller("Ctrl", function($scope) {
$scope.truck = "Truck Value";
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1786 次 |
| 最近记录: |