User-401080925 posted
Hi,again
I try to convert a VB.NET app to SPA with MVC Web Api and AngularJs,application it is used for restaurant orders
i've started my project with little steps:
I've created a page with buttons for every user defined in database,now I need to validate user/operator password
when a user button is selected I have to show a input type for password,should I use there a new view and configure route in angular?
becase application will be accesed with tablets or a pc with touch screen,it is possible to show a virtual keyboard on pc?
couple info about my project:
I have a solution with 2 projects:client(angular) and web api
for angular route I use ui-router(angular-ui-router.js) and for interact with server I use $resource (angular-resource.js)
this is the code for angular route:
(function () {
'use strict';
var app = angular.module('myApp', ["ui.router","common.services"]);
app.config(["$stateProvider",
"$urlRouterProvider",
function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/");
$stateProvider
.state("home", {
url: "/",
templateUrl: "app/views/operatorsView.html",
controller: "operatorsCtrl as vm"
})
}]
);
}
());
operatorsView.html:
<div class="panel">
<div class="page-header">
</div>
<div class="panel-body">
<div class="btn-group btn-group-lg" ng-repeat="operator in vm.operators">
<button type="button" class="btn btn-info">{{operator.NAME}}/button>
</div>
</div>
</div>
in index.htm I have
<div ui-view></div>
another thing I need:for a user/operator a have to get information about opened sales,web api controller gives me only operators list
how to create a custom query?
current web api controller:
public class OperatorsController : ApiController
{
private fbEntities db = new fbEntities();
public IQueryable<GS_OPERATORS> GetGS_OPERATORS()
{
return db.GS_OPERATORS;
}
thanks