Skip to main content

Posts

Showing posts from July, 2014

How to get a YouTube video thumbnail dynamically from the YouTube API using AngularJS

In this tutorial I have explain about the get YouTube thumbnail using AngularJS <html ng-app id="YoutubeApp">   <head>     <title>       How to get a YouTube video thumbnail dynamically from the YouTube API using  AngularJS Tutorials</title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>       function YoutubeController ($scope) {         $scope.todos = [];         $scope. addVideo = function() {           $scope.todos.push({text:$scope.todoText, done:false});           $scope.todoText = '';  ...

How to get facebook user details using AngularJS

In this tutorial I have explain about the fetch Facebook user details using AngularJS <html ng-app id="customersApp">   <head>     <title> How to get facebook user details using AngularJS Tutorials </title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>       var app = angular.module('customersApp',[]);       function facebookController($scope, $http) {           //DwayneJohnson - facebook UserId           $http.get('https://graph.facebook.com/?id=DwayneJohnson')             .success(function (data) {     ...

Add google map with marker using AngularJS

In this tutorial I have explain about Google map using AngularJS <html ng-app=" googlemapsApp ">   <head>           <script src="http://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js"></script>    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>    <title>Create google map using Angularjs Tutorials</title>    <style>      .map-container {         margin: 40px 260px;         }      #map {        height:420px;        width:600px;      }      .infoWindowContent {         font-size:  14px !important; ...

Remove or avoid %20 from url in PHP

Avoid the Empty spaces between the ( &name=%d ) variables. If you give empty space means  20% will occur in the url. ( &name=emptyspace%d )   Avoid Like this , It's cause the %20 in the url:  sprintf(' <a href="?page=list& name= %d " /> sharelist </a> ',$row['id'] );   Correct method :  sprintf(' <a href="?page=list& name=%d " /> sharelist </a>',$row['id'] );

Creating Custom directives in AngularJS with Example

Directive is a unique and powerful feature available only in Angular. Directive let you invent new html syntax, specific to your application. Directive can add:     1. Behaviors     2. Data binding to scope     3. Replace or to extend the Html element <html>     <head>         <title> Creating Custom directives in AngularJS </title>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>         <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"></script>     </head>     <body ng-app=" docsSimpleDirective ">         <h1>  Creating Custom directives using AngularJS </h1>    ...

Simple RESTful Json parsing using AngularJs Tutorials - 1

<html ng-app id="customersApp">   <head>     <title>RESTful JSON Parsing using AngularJs Tutorials - 1</title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>      function CustomersController ($scope,$http){                                         $http.jsonp('http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=JSON_CALLBACK')         .success(function(data) {           $scope.value = data;    ...

Simple RESTful Json parsing using AngularJs Tutorials

REST mean Representational State Transfer <html ng-app id="customersApp">   <head>     <title>RESTful JSON Parsing using AngularJs Tutorials</title>     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>     <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>     <script>       function CustomersController ($scope, $http) {                               $http.get('http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts')         .success(function (data) {           console.log(data.found);        ...

Assign the value to the variable in ng-click using AngularJS

<html ng-app> <head>      <title>ActiveTuts - AngularJs Tutorials</title> <script type="text/javascript"     src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head>      <body>      <div ng-controller=" TodoCtrl ">           <h2>Show and Hide the text using AngualrJs</h2>        <div ng-controller="TodoCtrl">           <input type="button" value="Show" ng-click =" showText=true ">           <input type="button" value="Hide" ng-click =" showText=false ">           <br/><br/><br/>           <div ng-show=" showTex...

PG::DuplicateTable: ERROR: relation "taggings" already exists in Ruby on Rails

Error: PG::DuplicateTable: ERROR:  relation "taggings" already exists Solution : Already the table present in your database.But migration also trying to create a table in database.For this reason error occurred. So try to remove the table (taggings) from your database.   postgresql :     > DROP TABLE IF EXISTS taggings;   Rails console :     > ActiveRecord::Migration.drop_table(:taggings)

How to limit the number of displayed lines using CSS

<html>   <head>    <style>     . restrict-lines {        //max-height : 40px;   /* Display 2 lines */       max-height : 20px; /* Display one line */        overflow: hidden;     }   </style>  </head> <body> <h1>How to limit the number of displayed lines using CSS</h1> <div class=" restrict-lines "> Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file! <div> </body> </html>