This file contains hidden or 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
<aura:component> | |
<aura:attribute name="parentAttribute" type="String"/> | |
<c:childComponent childAttribute="{!v.parentAttribute}"/> | |
</aura:component> |
This file contains hidden or 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
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-parent', | |
template: ` | |
<app-child [childMessage]="parentMessage"></app-child> | |
`, | |
styleUrls: ['./parent.component.css'] | |
}) | |
export class ParentComponent{ |
This file contains hidden or 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
{ | |
"accounts": { | |
"data": [ | |
{ | |
"access_token": "EAAFDM3WUGKwBAL8rb36fPpjywdRV83Va00uz52ijAfpluivmQo5479YCqppy0N9ByoTYdHmOkqEc8QWCOFhiIqQcE0LbGqObceaT5JZBLuZBJzjDNaEa4HRlin1TL0LZAAZBk8Dta7Dn5FZBE3kScqKi4n6RBcixJZBoSDwacnGy9ucCu87AiJoGBm8aSlLb2aDVZAQkgL2nwZDZD", | |
"category": "Sports Team", | |
"category_list": [ | |
{ | |
"id": "1801", | |
"name": "Sports Team" |
This file contains hidden or 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
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 |
This file contains hidden or 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
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" }); | |
} |
This file contains hidden or 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
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 = () => { |
This file contains hidden or 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
@InitBinder | |
public void initBinder(WebDataBinder dataBinder) { | |
StringTrimmerEditor stringTrimmerEditor = new StringTrimmerEditor(true); | |
dataBinder.registerCustomEditor(String.class, stringTrimmerEditor); | |
} |
This file contains hidden or 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
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; | |
This file contains hidden or 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
@Repository | |
public class CustomerDaoimpl implements CustomerDao{ | |
@Autowired | |
public SessionFactory sessionfactory; | |
@Override | |
public List<Customer> getCustomer() { | |
Session currentsession=sessionfactory.getCurrentSession(); |
This file contains hidden or 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
@Controller | |
@RequestMapping("/customer") | |
public class CustomerController { | |
@Autowired | |
private CustomerService customerService; | |
//@RequestMapping("/list") | |
@GetMapping("/list") |