This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="app"> | |
| <head> | |
| <script src="https://code.angularjs.org/1.3.0-beta.5/angular.js"></script> | |
| <script> | |
| angular.module('app', []); | |
| </script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="text" ng-model="foo"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="text" data-ng:model="foo"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div ng-controller="Controller"> | |
| Hello <input ng-model='name'> <hr/> | |
| <span ng-bind="name"></span> <br/> | |
| <span ng:bind="name"></span> <br/> | |
| <span ng_bind="name"></span> <br/> | |
| <span data-ng-bind="name"></span> <br/> | |
| <span x-ng-bind="name"></span> <br/> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <my-dir></my-dir> | |
| <span my-dir="exp"></span> | |
| <!-- directive: my-dir exp --> | |
| <span class="my-dir: exp;"></span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('app', []).directive('validate', function() { | |
| return { | |
| template: 'Esta é a minha primeira diretiva, e eu ainda estou aprendendo.' | |
| }; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Esta função retira apenas as chaves de nome igual a @index de | |
| * todos os objetos dentro de um array, coloca apenas os valores | |
| * das respectivas chaves nas respectivas ordens, dentro de um | |
| * array e logo depois faz um join(), retornando apenas | |
| * uma string, separada por @token. | |
| * Exemplo: | |
| * var users = [ | |
| * {name: 'Victor Queiroz'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| angular.module('auth', ['ngRoute', 'auth.directives', 'auth.services']). | |
| config(function($httpProvider, $provide) { | |
| $provide.factory('AuthInterceptor', function($q, $rootScope) { | |
| return { | |
| 'request': function (config) { | |
| return config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(window) { | |
| var only = function (keep) { | |
| var obj = this; | |
| Object.keys(obj).forEach(function(key) { | |
| if(keep.indexOf(key) === -1) | |
| obj.delete(key); | |
| }); | |
| return obj; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Account.query(function (q) { | |
| q.where('account.id', '=', 1); | |
| q.distinct().innerJoin('account_accounts', function () { | |
| this.on('account.id', '=', 'account_accounts.id'); | |
| }); | |
| }).fetch({ | |
| withRelated: ['accounts'] | |
| }).then(function (account) { | |
| return account.related('accounts').query(function (qb) { | |
| qb.where('account.id', '=', 1006); |
OlderNewer