& asks you to use your markup as a DSL
<html ng-app="ToDo">
<div ng-controller="ToDoCtrl">
<ul>
<li ng-repeat="item in todos">{{item.text}}
<small>({{$index}} of {{todos.length}})</small>
</li>
</ul>
<form ng-submit="addTodo()">
<input type="text" ng-model="newTodo"/>
</form>
</div>
</html>
angular.module('ToDo')
.controller 'ToDoCtrl', ($scope) ->
$scope.newToDo = ''
$scope.items = [
{id:0, text : 'Get groceries'}
{id:1, text : 'Pick up kids'}
]
$scope.addToDO = ->
$scope.items.push {id : $scope.items.length, text : $scope.newToDo}
$scope.newToDo = ''
they are tied to the structure of your dom
<html ng-app>
<div ng-controller="ToDoCtrl">
<ul>
<li ng-repeat="item in todos">{{item.text}}
<small>({{$index}} of {{todos.length}})</small>
</li>
</ul>
<form ng-submit="addTodo">
<input type="text" ng-model="newTodo"/>
</form>
</div>
</html>
$scope.$watch "themeName", (newTheme, prevTheme)->
if newTheme != prevTheme
htmlTag
.removeClass(prevTheme)
.addClass(newTheme)
$scope.setThemeName(newTheme)
<span ng-show="!widget.settingsOpen">
<span>
{{widget.name}}
</span>
<small ng-class="{redTimeScale: widget.settings.timeScale.showWarning}">
{{widget.settings.timeScale.get()}}
</small>
</span>
$scope.$on 'nubChange', (event, nub, index, nubsID) -> #...
$scope.$on 'dragResizeEnd', (e, elem, width, resizeID) -> #...
$scope.$on 'filtered-select-up', (e, data) -> #...
$scope.$on 'filtered-select-selected', (event, data) -> #...
$rootScope.$on 'DRILL-DOWN', -> #...
<div id="CaseDetails" ng-controller="CaseDetailsController">
Case Details
<div case-card></div>
<div case-evidence></div>
</div>
class CaseUI
showCaseCard : () ->
caseToShow = this.parent.parent.case
# ...
class CaseUI
showCaseCard : (caseToShow) ->
# ...
Uhhhhhhh....
<case-card case-id="123"></case-card>
<ui-date-picker ng-model="ctrl.dateModel" format="MM/DD/YY"></ui-date-picker>
<ui-dropdown
ui-dropdown-keys="{display: 'name', selected: 'name' }"
ng-model="example.selected"
></ui-dropdown>
angular.module('Analyze').controller 'AnalyzeCtrl', (
$scope, $window, Socket, $location, $rootScope, $timeout, $filter,
MasterQuery, EVENT_INDEX_ID, Layout, Task, User,
CurrentView, VolumeChart, Drilldown, AuditLogModel, AuditLogSvc) ->
# ...
Model
Controller
View
Services