Scopes en Javascript:
Si haces algo en plan:
var a = 10;
function foo() {
console.log(a);
}Scopes en Javascript:
Si haces algo en plan:
var a = 10;
function foo() {
console.log(a);
}| .controller('A', function($scope, $state){ | |
| $scope.functionA = function(ID){ | |
| $state.go('next-state', {number: ID}); | |
| }; | |
| }) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>TypeScript Introduccion</title> | |
| </head> | |
| <body> | |
| <script src='greeter.js'></script> | |
| </body> | |
| </html> |
| var Student = (function () { | |
| function Student(firstName, middleInitial, lastName) { | |
| this.firstName = firstName; | |
| this.middleInitial = middleInitial; | |
| this.lastName = lastName; | |
| this.fullName = firstName + " " + middleInitial + " " + lastName; | |
| } | |
| return Student; | |
| }()); | |
| function greeter(person) { |
| class Student { | |
| fullName : string; | |
| constructor(public firstName, public middleInitial, public lastName) { | |
| this.fullName = firstName + " " + middleInitial + " " + lastName; | |
| } | |
| } | |
| interface Person { | |
| firstName : string; | |
| lastName : string; |
| @section scripts { | |
| <script> | |
| var app = window.app = {}; | |
| app.userTypes = @Html.Raw(Json.Encode(Model.GetUserTypes())); | |
| </script> | |
| <script src="~/Scripts/angular.min.js"></script> | |
| <script src="~/Scripts/angular-resource.min.js"></script> | |
| <script src="~/Scripts/underscore.min.js"></script> | |
| <script src="~/Scripts/angular/main.js"></script> |
| app.factory('BearerAuthInterceptor', function ($window, $q) { | |
| return { | |
| request: function(config) { | |
| config.headers = config.headers || {}; | |
| if ($window.localStorage.getItem('token')) { | |
| // may also use sessionStorage | |
| config.headers.Authorization = 'Bearer ' + $window.localStorage.getItem('token'); | |
| } | |
| return config || $q.when(config); | |
| }, |
Step by step to install Scala + Play Framework in Ubuntu 14.04 with Activator.
Install Scala
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.6.deb
sudo dpkg -i scala-2.11.6.deb
sudo apt-get update
sudo apt-get install scala