So here is the usual html file uploading interface
I wanted to show a button to choose file and After choosing display a button to upload that file. Chosen file name also displayed in a nice way. As follows
$http
and $animate
offered by angular but services can be implemented according to needs in application.
document.getElementById("GetViewsbyPageId").onchange = function () {
var pageId = $("#GetViewsbyPageId").val();
if (pageId != 0) {
$("#LoadViewsbyPageId").show();
//sending a get request
$.get('page'+pageId+".html",function (data) {
/* data is the pure html returned from get method, load it to your page */
$('#LoadViewsbyPageId').html(data);
});
} else {
$("#LoadViewsbyPageId").hide();
}
}
<!DOCTYPE html>
<html ng-app="app" >
<head>
<title>Ajax With Angular</title>
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
th{
background: lightgray;
}
</style>
</head>
var singletonObject ={
method1:function(){
},
method2:function(){
}
}
use [database name]
>>db
will return the name of the current database.
use people