var hsbc = angular.module('hsbc',['ngResource','ngRoute']);
Run Code Online (Sandbox Code Playgroud)
hsbc.config(['$ routeProvider','$ locationProvider',function($ routeProvider,$ locationProvider){
//console.log('config part working');
$routeProvider
.when('/login', {
controller: 'hsbccontroller',
templateUrl: 'modules/authentication/views/login.html',
hideMenus: true
})
.when('/gloabltranfer', {
controller: 'hsbccontroller',
templateUrl: 'modules/home/views/gloabltranfer.html'
})
.when('/tranferReq', {
controller: 'hsbccontroller',
templateUrl: 'modules/home/views/TransferRquest.html'
})
.when('/reviewdetail', {
controller: 'hsbccontroller',
templateUrl: 'modules/home/views/Reviewdetails.html'
})
.when('/confirmdetail', {
controller: 'hsbccontroller',
templateUrl: 'modules/home/views/confirmdetails.html'
})
.when('/', {
controller: 'hsbccontroller',
templateUrl: 'modules/authentication/views/login.html'
})
.otherwise({ redirectTo: '/login' });
Run Code Online (Sandbox Code Playgroud)
}]).controller('hsbccontroller',['$ scope','$ http','$ resource',function($ scope,$ resource,$ http){
//console.log('controller part working');
$http.get('http://localhost:8080/1/').success(function(data) {
alert(data);
$scope.greeting = data;
});
Run Code Online (Sandbox Code Playgroud)
}]);
请建议我以任何方式获取和更新打字稿中 HTML 元素的高度。
document.getElementsByClassName('height').style.height = childHeight;
Run Code Online (Sandbox Code Playgroud)
不管用。我得到
类型“HtmlCollectionOf<Element>”上不存在属性“style”