@ScotHillier
Web Parts Workflows Pages Libraries App Parts SharePoint-Hosted Apps Provider-Hosted Apps
Module Routes ViewController DirectivesFactory $scope
Initializes the app. Can be anonymous or named. Creates a property on the ViewModel References a controller named “myCtrl”, which creates a new ViewModel. References a controller method to call on a click event
{{firstName}} Binds ViewModels to HTML elements Uses {{…}} syntax References a property of a ViewModel Supports two-way binding This example will display whatever the user types
//module var myapp = angular.module("MyApp", []); Reference dependent modules
//controller myapp.controller("welcomeCtrl", ["$scope", function welcomeCtrl($scope) { //model $scope.welcomeMessage = "Hi"; } ); Build up the $scope (a.k.a, View Model)
{{welcomeMessage}} Bind the $scope to the HTML elements
@media (max-width: 600px) {.facet_sidebar { display: none; } //media query with JavaScript var mq = window.matchMedia("(max-width:600px)"); mq.addListener(function () { //do something; });
.col-xs-12.col-md-8.col-xs-6.col-md-4.col-xs-6.col-md-4.col-xs-6
Sponsored by