Posts

Showing posts with the label Angularjs

back-end errors or serverError handling in Angularjs

app.factory( 'ActionMessageService' , function () { var objToReturn = {}; var _MESSAGE_DETAIL = { ERROR : { type : "ERROR" , bootstrapClass : "alert alert-danger" }, OK : { type : "OK" , bootstrapClass : "alert alert-success" }, INFO : { type : "INFO" , bootstrapClass : "alert alert-info" }, WARNING : { type : "WARNING" , bootstrapClass : "alert alert-warning" }, NOT_FOUND : { type : "ERROR" , bootstrapClass : "alert alert-danger" }, }; var _MESSAGE_STATUS = { 400: _MESSAGE_DETAIL.WARNING , 200: _MESSAGE_DETAIL.OK , 500: _MESSAGE_DETAIL.ERROR , 404: _MESSAGE_DETAIL.NOT_FOUND }; var _getActionMessage = function (response) { var actionMessage = response.data.Message; if (response.data.ModelState) { _.forEach(_.flatMap(response.data.ModelSta...

AngularJS Dynamic table with add/remove

<body ng-app= "myapp" ng-controller= " TestController" > <div class= "container" > <div class= "row" > <div class= "col-md-12" > <div class= "panel panel-default" > <div class= "panel-body" > <form ng-submit= "addNew()" > <table class= "table table-striped table-bordered" > <thead> <tr> <th><input type= "checkbox" ng-model= "selectedAll" ng-click= "checkAll()" /></th> <th> Firstname </th> <th> Lastname </th> ...

Uploading Multiple Files and form Object through an ASP.NET Web API Service using angular-material-fileinput (AngularJS)

HTML :    <md -content > <md -tabs md-dynamic-height md-border-bottom > <md -tab label= "Basic Info" > <md -content class= "md-padding" > <md -card > <md -card-title > <md -card-title-text > <span class= "md-headline" > Basic Information Preferences </span> <span class= "md-subhead" > Tell us a little about the venue. </span> < /md-card-title-text> < /md-card-title> <md -card-content > <div...