Как можно начать использовать в таком проекте commonJS-модули и es2015?
function HomeButtonController($location) {
var vm = this;
vm.goHome = function () {
$location.path('/');
}
}
function homeButtonDirective() {
restrict: 'E',
controller: HomeButtonController,
controllerAs: 'vm',
transclude: true,
template: '<button ng-click="vm.goHome()" ng-transclude></button>'
}
но вторая его версия пишется на TypeScrip
class Foo {
bar = 'default property value';
constructor(untypedArg) {
this.foobar = untypedArg;
}
}
Through developer preview and alpha we've worked closely with several large projects here at Google including AdWords, GreenTea (Google's internal CRM system), and Google Fiber. In fact, just a few weeks ago we saw Google Fiber launch on their new Angular 2 code base.
Externally, we've worked closely with several other teams integrating with Angular 2 including Ionic Framework on Ionic 2, Telerik on NativeScript, Rangle.io on Batarangle, and many others.
Мешать логику js c логикой шаблонизатора Twig, Blade и т.д. Или же фронтенд отделить целиком от бекенда, сделав бекенд чисто REST ?
var data = $.param({
зфкфьі: ["apple", "potato"] ,
});
$http.put('http://*****/mongorest/control/get-menu?'+ data)
$http.put('/some/url', {
someKey: ["apple", "potato"] ,
}).then(function (response) {
// не пользуйтесь .success/.error
}, function (reason) {
// пользуйтесь только промисами.
});
$http.get('/something', {
params: {
query: 'param'
}
}
На каждое подключение нужно создавать отдельный экземпляр spa приложения для его пререндера?