7:30 – 4:30 SR
- Angular
- Let’s try building a directive that we use ng-repeat on. Not too bad! Here’s how I did it:
Directive javascript:
pa.directive('oldPost', ['$window', function($window) {
return {
templateUrl: 'directives/oldPost.html',
restrict: 'AE',
scope: {pobj: '='}
}
}]);
Directive HTML (directives.oldPost.html):
<div class="inputWrapper">
<div class="textLabel">Posted: {{pobj.postDate}}</div>
<textArea class="textAreaOutput" ng-model="pobj.postText" ng-disabled="true"></textArea>
</div>
Master HTML:
<div ng-repeat="pobj in mainCtrl.postItems"> <old-post pobj = "pobj"></old-post> </div>
- And Let’s try to get animated transitions working.
- Which means that it’s time to get more familiar with CSS3. Working through CSS3 Transformations And Animations. Nope, that didn’t help – angular is different. Trying Learning AngularJS Animations
