Friday, 21 April 2017

setup xampp on linux

http://ubuntuportal.com/2013/12/how-to-install-xampp-1-8-3-for-linux-in-ubuntu-desktop.html

Thursday, 13 April 2017

how to mange angularjs routing

put the two basic javascript source which is need for angularjs and anularjs routing.
----------------------------------------------------------------

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.7/angular-route.min.js"></script>
<script src="main.js"></script>
----------------------------------------------------------------

var app = angular.module('myApp', ['ngRoute']);

app.config(function($routeProvider) {
  $routeProvider

  .when('/', {
    templateUrl : 'pages/home.html',
    controller  : 'HomeController'
  })

  .when('/blog', {
    templateUrl : 'pages/blog.html',
    controller  : 'AboutController1'
  })

  .when('/about', {
    templateUrl : 'pages/about.html',
    controller  : 'AboutController'
  })

  .otherwise({redirectTo: '/'});
});
app.controller('HomeController', function($scope) {
  $scope.message = 'Hello from HomeController';
});

app.controller('BlogController', function($scope) {
  $scope.message = 'Hello from BlogController';
});

app.controller('AboutController', function($scope) {
  $scope.message = 'Hello from AboutController';
});
app.controller('AboutController1',function($scope){
debugger;
alert("hii pawan");
$scope.mainmsg='home page';
});

how to create angularjs module

var myapp=angular.module("pawanapplication",['pass list of dependencies']);
how to use my app on controller
myapp.controller("controllername",function($scope,dependencies like $http){

hare you can write your code;

});

angular js error type

https://medium.com/@jonsamp/angularjs-finding-and-fixing-errors-dcd648329fe9

curl tuttorial

http://www.web-technology-experts-notes.in/2015/04/php-interview-questions-and-answers-for-2-year-experience.html

ajax call example

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#save").click(function(e){
e.preventDefault();
alert("hi");
var title=$("#title").val();
var desc=$("#title_desc").val();

var dataString = 'title='+ title + '&desc='+ desc;
$.ajax({
url:'http://localhost/CodeIgniter-3.1.0/index.php/welcome/showData',
type:'POST',
data:dataString,
success:function (response){
debugger;
alert("res");
}
});
});
});
</script>

Tuesday, 11 April 2017

use html engine in node js

http://www.makebetterthings.com/node-js/how-to-use-html-with-express-node-js/