Category:

Post form data to server in AngularJs

Simple tip to send your form data to server using angular js and get that data in $_POST variable <html> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script> <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js”></script> <script type=”text/javascript”> var app = angular.module(“myApp” , []); app.controller(“sendForm” , function($scope, $http){ $scope.saveData= function(){ $scope.signError = false; $scope.signSuccess = false; var request […]

Continue Reading
Posted On :
Category:

Key value pair in Angular Js

This is very simple and useful tip for those who want to use associative array in angular js. In this i an show you how to dynamically generate menu using angular js which have menu name and menu link. Sample Code <html> <head> <title>Angular JS</title> <script src=’https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js’></script> </head> <body ng-app=””> <div> <ul ng-init=”menusLinks=[{‘#intro’: ‘Intro’},{‘#one’: ‘What […]

Continue Reading
Posted On :