Monday, February 6, 2017

What are Global Value Providers in lightning components?

What are Global Value Providers in lightning components?


Global value providers are global values and methods that a component can use in expressions.




First we will see how to use $Browser global value provider to check the browser I am running my lightning component.




Output is:

Similarly, you can check browser information in a client-side controller using $A.get().

({
    checkBrowser: function(component) {
        var device = $A.get("$Browser.formFactor");
        alert("You are using a " + device);
    }
})


Similarly, you can check locale information in a client-side controller using $A.get().


({
    checkDevice: function(component) {
        var locale = $A.get("$Locale.language");
        alert("You are using " + locale);
    }
})




You can refer in salesforce documentation:

9 comments:

Unknown said...

Its fantatic explaintion lot of information gather it...nice article....
seo company in Chennai

Unknown said...

Hi,


Thanks for sharing the valuable information of Salesforce

samala swathi said...

This helps the readers a lot salesforce Online Training Hyderabad

Phuloo said...

Your post is interesting. Hope you have more useful posts like this
Ludostar.co Skinscraft footballgamesbeast.com

Bharat said...

Wonderful blog post, thank you so much for the great information which you provided.
Top 5 features of salesforce lightning

Salesforce Developer said...

Good Post. I like your blog.
Salesforce Lightning Consulting Services

All in One said...

Thanks for sharing such beautiful info , i think u will also share such type of info , i am very happy to that your way of consideration is very much good , i liked it.

Snapdeal Lucky Draw Prizes
Snapdeal Lucky Draw
Snapdeal Lucky Draw Prize
snapdeal online lucky draw
online shopping lucky draw
snapdeal lucky draw

Mohit Bansal said...

Nice Post
BOFC can easily mass create multiple fields by simply importing CSV or XLS or XLSX file to Salesforce. It can also help you in managing Salesforce org configuration using just a few clicks.

flama said...

Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Bayrak Fiyatlarımız İzmir. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack generations https://www.aybayrak.com/category/urunler/makam-bayragi/ Tar transom spirits.

Post a Comment

 
| ,