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.component в Angular 1.5+ | |
http://jsbin.com/musasenipe/edit?html,js,output |
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', []) | |
.controller('AppCtrl', ['ChuckQuotes', function (ChuckQuotes) { | |
var vm = this; | |
vm.jokesToFetch = ChuckQuotes.amount; | |
vm.changeAmount = function (value) { | |
ChuckQuotes.amount = vm.jokesToFetch; |
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', []) | |
.controller('AppCtrl', ['Items', function (Items) { | |
var vm = this; | |
vm.items = Items.getAll(); | |
vm.addNewItem = function () { | |
Items.addNewItem(); |
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
// Уже сегодня можно активно использовать Gulp 4 | |
// Установка через npm: | |
npm install gulpjs/gulp#4.0 | |
//Скорей всего глобально установлен gulp 3.x, но это не беда, gulp4 можно запускать и через npm. Для этого в package.json прописываем: | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"gulp": "./node_modules/.bin/gulp" | |
}, |
NewerOlder