Skip to content

Instantly share code, notes, and snippets.

View mak9456's full-sized avatar
🏠
Focussing

mak9456

🏠
Focussing
View GitHub Profile
<aura:component>
<aura:attribute name="parentAttribute" type="String"/>
<c:childComponent childAttribute="{!v.parentAttribute}"/>
</aura:component>
import { Component } from '@angular/core';
@Component({
selector: 'app-parent',
template: `
<app-child [childMessage]="parentMessage"></app-child>
`,
styleUrls: ['./parent.component.css']
})
export class ParentComponent{
{
"accounts": {
"data": [
{
"access_token": "EAAFDM3WUGKwBAL8rb36fPpjywdRV83Va00uz52ijAfpluivmQo5479YCqppy0N9ByoTYdHmOkqEc8QWCOFhiIqQcE0LbGqObceaT5JZBLuZBJzjDNaEa4HRlin1TL0LZAAZBk8Dta7Dn5FZBE3kScqKi4n6RBcixJZBoSDwacnGy9ucCu87AiJoGBm8aSlLb2aDVZAQkgL2nwZDZD",
"category": "Sports Team",
"category_list": [
{
"id": "1801",
"name": "Sports Team"
getUserInfo(userId) {
console.log("UserId" + userId);
let self = this;
FB.api(
"/" + userId + '?fields=name,accounts,email',
(result) => {
if (result && !result.error) {
self.userName = result.name;
self.userEmail = result.email;
self.pageaccountDetails = result.accounts.data
oauthLogin(socialProvider: string) {
FB.login((loginResponse) => {
localStorage.setItem(AppSettings.Authcookie, loginResponse.authResponse.accessToken);
this.showAuthUser = true;
this.getUserInfo(loginResponse.authResponse.userID);
this.isValidCredentials = true;
}, { scope: "public_profile,email,manage_pages,pages_messaging,pages_messaging_phone_number" });
}
ngOnInit() {
let self = this;
this.loaderService.show();
self.applicationId = "466740060734339"; // **Enter your Created FB App's ID**
self.loadFBSDK();
}
loadFBSDK() {
let self = this;
(<any>window).fbAsyncInit = () => {
@InitBinder
public void initBinder(WebDataBinder dataBinder) {
StringTrimmerEditor stringTrimmerEditor = new StringTrimmerEditor(true);
dataBinder.registerCustomEditor(String.class, stringTrimmerEditor);
}
@mak9456
mak9456 / Student.java
Created September 23, 2018 18:33
model student
package com.src.spring.mvc.model;
import java.security.KeyStore.PrivateKeyEntry;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
public class Student{
 private String Id;
 private String firstName;
 
@mak9456
mak9456 / CustomerDaoimpl.java
Last active September 25, 2018 07:06
CustomerDao implementation
@Repository
public class CustomerDaoimpl implements CustomerDao{
@Autowired
public SessionFactory sessionfactory;
@Override
public List<Customer> getCustomer() {
Session currentsession=sessionfactory.getCurrentSession();
@mak9456
mak9456 / CustomerController.java
Last active September 25, 2018 07:06
CustomerController.java
@Controller
@RequestMapping("/customer")
public class CustomerController {
@Autowired
private CustomerService customerService;
//@RequestMapping("/list")
@GetMapping("/list")