AvePoint Meetings Author Senior Product Marketing Manager – Office Jan 2010 14 Core.

Download Report

Transcript AvePoint Meetings Author Senior Product Marketing Manager – Office Jan 2010 14 Core.

AvePoint Meetings
Author
Senior Product Marketing
Manager – Office
Jan 2010
14 Core
thinkste
r
feedback
17,000 LOC
6 months
x 3 devs
1,500 LOC
3 weeks
Before
with Angular
Basics
<html ng-app>
<head>
<script
src="lib/angular/angular.js"></script>
</head>
http://docs.angularjs.org/guide/databinding
Data Binding
<li>NO of phones: {{ phones.length }}</li>
Modules
var myApp = angular.module('myApp', []);
Scope
function PhoneListCtrl($scope) {
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster
with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi”}
];
}
Controllers
<body ng-controller="PhoneListCtrl">
<ul>
<li ng-repeat="phone in phones">
{{phone.name}}
<p>{{phone.snippet}}</p>
</li>
</ul>
Directives
<edit-in-place
value="contact.name"></edit-in-place>
app.directive( 'editInPlace', function()
{
Defining Services
myApp.service('helloWorldFromService',
function () {
this.sayHello = function () {
return "Hello, World!"
};
});
Calling Services
function MyCtrl($scope,
helloWorldFromService) {
$scope.hellos =
[helloWorldFromService.sayHello()];
}
Different Setup
<asp:Content
ContentPlaceHolderID="PlaceHolderMain"
runat="server">
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angu
larjs/1.0.1/angular.min.js"></script>
<div ng-app="myApp">
myApp.controller('TodoCtrl', function
TodoCtrl($scope, SharePointJSOMService) {
myApp.controller('TodoCtrl', ['$scope',
'SharePointJSOMService', function
($scope, SharePointJSOMService) {
App.directive('load', function() {
return {
replace: true,
restrict: 'E',
templateUrl: "inc/header.html"
};
template:
'<div ng-hide="isDeleted">' +
' <div class="col-md-12 colxs-12" ng-show="editMode" >' +
' <form class="form-inline"
role="form">' +
'
<div
class="checkbox">' +
compile: function (tElement, tAttrs) {
JSRequest.EnsureSetup();
hostweburl =
decodeURIComponent(JSRequest.QueryString[
"SPHostUrl"]);
var siteUrl = hostweburl;
var tplURL = siteUrl +
'/Complete%20Me/Pages/template.html';
return {
pre: function preLink(scope, iElement, iAttrs,
controller) {
templateLoader.then(function (templateText) {
iElement.html($compile(tElement.html())(scope));
 });
var previousValue;
scope.edit = function () {
http://code.msdn.microsoft.com/office/SharePoint2013-Add-the-900e0742
Explore
articles
Connect
OfficeSPDev.UserVoice.Com
Solve your roadblocks on StackOverflow
[Office] and [SharePoint]
Build
Office Dev Tools for
Visual Studio 2013 and Office 365 API Tools for Visual
Studio 2013