"Brian Cox" function "My name is " function var "My name is " function this function function(n function var this "My name is " this "Brian Cox"
Download
Report
Transcript "Brian Cox" function "My name is " function var "My name is " function this function function(n function var this "My name is " this "Brian Cox"
"Brian Cox"
function
"My name is "
function
var
"My name is "
function
this
function
function(n
function
var
this
"My name is "
this
"Brian Cox"
function myPromise() {
var deferred = $.Deferred();
setTimeout(function() {
deferred.resolve("success!");
}, 1000);
return deferred.promise();
}
myPromise().then(
function(value) {
alert(value);
},
function() {
alert("error!");
}
);
window.Wingtip = window.Wingtip || {};
Wingtip.ChromeControl = function () {
render = function () {
var options = {
"appIconUrl": "../Images/AppIcon.png",
"appTitle": "App Title",
"appHelpPageUrl": "../Help",
"settingsLinks": [
{
"linkUrl": "../Page1/Method1?" + document.URL.split("?")[1],
"displayName": "Page1"
},
{
"linkUrl": "../Page2/Method1?" + document.URL.split("?")[1],
"displayName": "Page2"
}
]
};
var nav = new SP.UI.Controls.Navigation(
"chrome_ctrl_placeholder_id",
options
);
nav.setVisible(true);
},
getQueryStringParameter = function (p) {
var params =
document.URL.split("?")[1].split("&");
var strParams = "";
for (var i = 0; i < params.length; i = i + 1) {
var singleParam = params[i].split("=");
if (singleParam[0] == p)
return singleParam[1];
}
}
return {render: render }
}();
658 bytes
377 bytes
window.Wingtip=window.Wingtip||{},Wingtip.ChromeControl=function(){return
render=function(){var n=new
SP.UI.Controls.Navigation("chrome_ctrl_placeholder_id",{appIconUrl:"../Images/AppIc
on.png",appTitle:"App
Title",appHelpPageUrl:"../Help",settingsLinks:[{linkUrl:"../Page1/Method1?"+documen
t.URL.split("?")[1],displayName:"Page1"},{linkUrl:"../Page2/Method1?"+document.URL.
split("?")[1],displayName:"Page2"}]});n.setVisible(!0)},getQueryStringParameter=fun
ction(n){for(var
r=document.URL.split("?")[1].split("&"),i,t=0;t<r.length;t=t+1)if(i=r[t].split("=")
,i[0]==n)return
i[1]},{render:render}}(),$(document).ready(function(){Wingtip.ChromeControl.render(
)})
function
"SPHostUrl"
"SPAppWebUrl"
var
"SP.RequestExecutor.js"
_api is new alias for _vti_bin/client.svc
Server
Client
Execute
Query
OData
JavaScript
Library
Silverlight
Library
Custom Client Code
.NET CLR
Library
"/_api/web/currentuser"
"#message"
"Hello "
"/_api/web/currentuser"
"GET"
"accept" "application/json?odata=verbose"
function
"#message"
function
"Hello "
function
"resultsDiv"
"resultsTable" data-bind "foreach: get_contacts()"
data-bind "text: get_lname()"
data-bind "text: get_fname()"
data-bind "text: get_phone()"
function
var
ko.observableArray()
function
function
function
//update observable array
function
<WebTemplate FeatureId="8cbacfba-45a8-4a09-b765-02b87eb79c28"
Id="{8CBACFBA-45A8-4A09-B765-02B87EB79C28}#WebTemplate"/>
function
function
var
"appIconUrl" "../Images/AppIcon.png"
"appTitle" "App Title"
"appHelpPageUrl" "../Help"
"settingsLinks"
"linkUrl" "../Page1/Method1?"
"displayName" "Page1"
var
"chrome_ctrl_placeholder_id"
"?"