html怎么用ui打开,如何使用kendo-UI打开外部Angularjs html文件

当您创建剑道窗口,在定义你要引用是要绑定到数据视图或模板控制器你想要在窗口中显示。

这是我的index.html

Contenido

{{ fName }}

.example {

min-height: 400px;

}

var MyApp = angular.module("KendoDemos", [ "kendo.window", "kendo.directives" ]);

MyApp.controller("MyCtrl", MyCtrl);

MyApp.controller("InvoiceController", InvoiceController);

function MyCtrl($scope, $kWindow) {

var noteNumber = 0;

//$scope.hello = "Hello from Controller!";

$scope.fName = 'Esta es una prueba data from parent window to child';

var noteWindowDivId = "noteWindow" + noteNumber;

$scope.open=function(){

var windowInstance = $kWindow.open({

options:{

draggable: true,

resizable: true,

width: "500px",

height: "375px",

title: 'Multiventanas',

scrollable: true,

actions: ["Minimize", "Maximize", "Close"],

visible: false

},

templateUrl: 'template/window/databinding2.html',

controller: 'InvoiceController',

resolve: {

message: function() {

return $scope.fName;

}

}

});

};

}

function InvoiceController($scope, message) {

$scope.message333 = message;

$scope.qty = 1;

$scope.cost = 2;

$scope.inCurr = 'EUR';

$scope.currencies = ['USD', 'EUR', 'CNY'];

$scope.usdToForeignRates = {

USD: 1,

EUR: 0.74,

CNY: 6.09

};

$scope.total = function total(outCurr) {

return $scope.convertCurrency($scope.qty * $scope.cost, $scope.inCurr, outCurr);

};

$scope.convertCurrency = function convertCurrency(amount, inCurr, outCurr) {

return amount * $scope.usdToForeignRates[outCurr]/$scope.usdToForeignRates[inCurr];

};

$scope.pay = function pay() {

window.alert("Thanks!");

};

}

MyCtrl.$inject = ['$scope', '$kWindow'];

databinding2.html

Invoice:

Quantity:

Costs:

{{c}}

Total:

{{total(c) | currency:c}}

Pay

{{message333}}

你不必写一个完整的HTML格式,你外部HTML文件(儿童),因为它取决于它的父母形式。我希望这个例子可以帮助别人!祝你今天愉快。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值