<!-- HTML -->
<div ng-controller="GreetCtrl">
<p>Good {{ time }}, {{ name }}</p>
</div>
//JS
function GreetCtrl($scope) {
$scope.time = "Morning";
$scope.name = "World";
}
Good Morning, World
<div ng-controller="GreetCtrl">
<input ng-model="name" />
<p>Good Morning, {{ name }}</p>
</div>
function GreetCtrl($scope) {
$scope.name = "World";
}
<!-- HTML -->
<div ng-controller="GreetCtrl">
<select ng-options="time in times" ng-model="selectedTime"></select>
<ul ng-repeat="time in times">
<li ng-show="time == selectedTime">
Good {{ time }}, {{ name }}
</li>
<li ng-hide="time == selectectedTime">
<strike>Good {{ time }}, {{ name }}</strike>
</li>
</ul>
</div>
//JS
function GreetCtrl($scope) {
$scope.name = "World"; $scope.times = ["Morning", "Afternoon", "Evening", "Night"];
}
//JS
var app = angular.module("app", []);
app.controller("GreetCtrl", function($scope) {
$scope.time = "Morning";
$scope.name = "World";
});
app.directive("sayHello", function() {
return {
restrict: "E",
template: "{{ time }}, {{ name }}"
}
});
<!-- HTML -->
<say-hello></say-hello>
<panel tabbed> <tab> <tab-title>Tab 1</tab-title> <tab-content> <lorem-ipsum /> <!-- ;-) --> </tab-content> </tab> </panel>
<leaflet-map locations="assets" refresh-interval="10 seconds" provider="google"></leaflet>
<calendar events="events" title="School Events Calendar" on-click="eventForm"></calendar>