This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
วิธ๊การทำนั้นง่ายมาก ๆครับขั้นตอนที่ 1 เข้ามาที่เว็บไซต์ | |
https://gist.github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
เนื้อหาของไฟล์ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var simpleApp = angular.module('simpleApp', []); | |
simpleApp.controller('simpleController', ['$location',function($location){ | |
/** receive data */ | |
var id = $location.search().id; | |
console.log(id); | |
/** send argument */ | |
$location.path('/redirect-path').search('id','1234'); | |
}]); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** config constant */ | |
(function() { | |
var configModule = angular.module('configModule', []); | |
configModule.constant('config', { | |
local: { | |
baseApi: 'http://localhost', | |
port: '8080', | |
register: '/register' | |
timeOut: 1800, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** use config app simple */ | |
(function() { | |
var useConfigApp = angular.module('switchEnv', ['configModule']); | |
useConfigApp.Controllers('simpleController', ['serviceEnv', function(serviceEnv) { | |
var baseUrl = serviceEnv.env.baseApi; | |
var port = serviceEnv.env.port; | |
var register = serviceEnv.env.register; | |
var timeOut = serviceEnv.env.timeOut; | |
}]); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** switch env detect */ | |
(function() { | |
var switchEnv = angular.module('switchEnv', ['useConfigApp']); | |
switchEnv.service('serviceEnv', ['config','$location', function(config,$location) { | |
this.env = function(host){ | |
var host = !angular.isUndefined(host) ? host : $location.host(); | |
switch(host) { | |
case 'local': | |
return config.local; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="facebookAngularjs"> | |
<head> | |
<title>Facebook authentification with angularJS By Samark Chaisanguan</title> | |
<script type="text/javascript" src="js/angular.min.js"></script> | |
<script type="text/javascript" src="js/angular-route.min.js"></script> | |
<script type="text/javascript" src="js/main.js"></script> | |
<script type="text/javascript" src="js/config/moduleConfig.js"></script> | |
<script type="text/javascript" src="js/factory/facebookFactory.js"></script> | |
<script type="text/javascript" src="js/controllers/mainController.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fb-root"></div> | |
<fb:login-button show-faces="true" max-rows="1" size="large"></fb:login-button> | |
{{ name }} | |
<br> | |
name: {{ list.item.name}}<br> | |
lastName: {{ list.item.lastName}} | |
<pre> | |
{{ list | json}} | |
</pre> | |
<pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
"use strict"; | |
var facebookAngularjs = angular.module('facebookAngularjs', [ | |
'ngRoute', | |
'mainController', | |
'moduleConfig', | |
]); | |
facebookAngularjs.config(function($routeProvider) { | |
$routeProvider.when('/index', { |
OlderNewer