Skip to content

Instantly share code, notes, and snippets.

function addTest(a, b) {
return a * b;
}
var val = addTest(zzz, 5);
function getBMI(weight: number, tall: number): number {
return weight / (tall * tall);
}
var bmi = getBMI(65, 1.75);
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": false,
"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true
<html>
<head>
<script type="text/javascript" src="bmi.js"></script>
</head>
<body>
<script type="text/javascript">
alert(bmi);
</script>
</body>
</html>
<div>
<!-- ここは親画面 -->
<button ng-click="モーダルダイアログ表示する関数" />
</div>
<!-- モーダルダイアログ -->
<div ng-cloak>
<!-- モーダルダイアログの中身 -->
this.doAfunc();
this.doBfunc();
doAfunc() {
hhtp通信
}
doBfunc() {
hhtp通信
doAfunc() {
this.$http({
method: 'GET',
url: '/Afunc',
}).success((resul: any, status, headers, config) => {
//HTTP通信の成功
this.$scope.$emit('wait1', result);
}).error((result: any, status, headers, config) => {
//HTTP通信の失敗
});
.short {
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
::-ms-clear {
display: none;
}
{
"compilerOptions": {
"target": "es5", "module": "commonjs", "sourceMap": false, "outDir": "../sample01/js"
}
}