为什么我不能让Angular Xeditable在我的Heroku网站上实时工作?

时间:2016-05-15 15:24:35

标签: angularjs node.js express heroku x-editable

我试图理解为什么角度xeditable并不适用于我的heroku应用程序。我在本地工作但没有现场工作的例子,所以我试图理解为什么这样做。

它应该像这样工作:http://jsfiddle.net/NfPcH/25/。单击文本时,它允许您编辑内联并保存更改。

但是当我点击文字链接时,没有任何反应。当前页面的网址只会更改为附加到结尾

我已经安装了使用' npm install angular-xeditable@0.1.12'的angular-xeditable;在我的项目目录中

以下是文件:

dashboard.ejs

<!DOCTYPE html>
<html>
<head>
<% include ../partials/header.ejs %>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
    <script type='text/javascript' src="https://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>
    <link rel="stylesheet" type="text/css" href="https://vitalets.github.io/angular-xeditable/dist/css/xeditable.css">
    <script type='text/javascript' src="test.js"></script>
</head>

<body>
<% include ../partials/nav.ejs %>
<div class = "jumbotron">
    <h1>Dashboard</h1>   
</div>
    <div class="dashboard">
    <div class="container" style="background-color: white !important"> 
    <h4>Angular-xeditable Text (Bootstrap 3)</h4>
      <div ng-app="app" ng-controller="Ctrl">
        <a href="#" editable-text="user.name">{{ user.name || 'empty' }}</a>
      </div>
    </div>
    </div>
</body>
</html>

test.js

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

app.run(function(editableOptions) {
   editableOptions.theme = 'bs3';
});

app.controller('Ctrl', function($scope) {
    $scope.user = {
    name: 'awesome user'
};
});

0 个答案:

没有答案
相关问题