Hi Vijay,

Which is your backend language. 

On Thursday, December 10, 2015 at 10:36:18 PM UTC+5:30, Vijay Kumar wrote:
>
> Hi All,
>
> I am new to Angular JS , i need to save the form details into DB using 
> angular js and Web API 2
>
> Here is my solution architecture
>
> My Web Application solution has
> 1.Angular JS (Single Page Application using Angular Start project template)
> 2.Class Library for Entity Framework
> 3.BAL class library
>
> and Web API is a separate solution -- it resides in different location.
>
> Here is my angular js call to web api..
>
>  $http({
>             method: 'POST',
>             url: 'http://localhost:2649/api/lookup',
>             data: JSON.stringify(lookupdata),
>             headers:{
>                 'Access-Control-Allow-Origin': '*',
>                 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, 
> OPTIONS',
>                 'Access-Control-Allow-Headers': 'Content-Type, 
> X-Requested-With',
>                 'X-Random-Shit':'123123123'
>             }
>         }).then(function successCallback(response) {
>         
>             $scope.error = response;
>          
>         }, function errorCallback(response) {
>           
>             $scope.error = response;
>         });
>
> and web api method is 
>
>  [HttpPost]
>         public bool Post(string value)
>         {
>
>           here saving the data into DB using DbContext
> }
>
> Please let me know what mistake is there
>
> Thanks,
> Vijay Devd
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to