Arquivo da tag: HTML

Código fonte das aulas 1 a 12 do curso egghead.oi

– Quando estamos usando o state podemos usar esse recurso:
HTML

Url Teste

– Criando um test:
JSSpec

describe(‘filter’, function(){
     beforeEach(module(‘myApp’));

     describe(‘reverse’, function() {
          it(’should reverse a string’, inject(function(reverseFilter) {
               expect(reverseFilter(‘ABCD’)).toEqual(‘DCBA’);
               expect(reverseFilter(‘John’)).toEqual(’nhoJ’);
          }))
     })
})

   

– uiRepeat com um filter:
JS

     
                                                                                                          
{{actor.name}}{{actor.character}}
     

– uiRepeat com filter, limitTo e orderBy:
HTML


– Diretivas em uma tag só:
HTML

     

JS

app.directive("superman", function() {
     return {
          restrict: "A",
          link: function() {
               alert("I'm working stronger");
          }
     };
});

app.directive("flash", function() {
     return {
          restrict: "A",
          link: function() {
               alert("I'm working faster");
          }
     };
});

Share and Enjoy !

0Shares
0


0

AngularJS – Animação com JavaScript




    
    
    





I'm too young to fade! :(
var app = angular.module("app", ["ngAnimate"]);

app.controller("AppCtrl", function() {
    this.toggle = true;
});

app.animation(".toggle", function () {
    return {
        leave: function (element, done) {
            element.text("Nooooo!!!");
            TweenMax.to(element, 1, {opacity:0.5})
        },
        enter: function (element, done) {
            element.text("Yay, I'm alive!")
            TweenMax.from(element, 1, {opacity:0})
        }
    }
})
{
  "name": "AnimationTutorials",
  "version": "0.0.0",
  "authors": [
    "johnlindquist"
  ],
  "license": "MIT",
  "private": true,
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "angular-animate": "~1.2.12",
    "angular": "~1.2.12",
    "greensock": "~1.11.4",
    "topcoat": "~0.8.0"
  }
}

Share and Enjoy !

0Shares
0


0