{"id":26601558,"url":"https://github.com/fabiomirandaa/boilerplate-angular-es6-webpack2","last_synced_at":"2025-07-03T14:09:07.090Z","repository":{"id":12777950,"uuid":"72783422","full_name":"fabiomirandaa/boilerplate-angular-es6-webpack2","owner":"fabiomirandaa","description":"Boilerplate angular 1.x with ES6 and Webpack 2","archived":false,"fork":false,"pushed_at":"2022-12-10T16:06:57.000Z","size":1332,"stargazers_count":15,"open_issues_count":16,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T16:48:32.760Z","etag":null,"topics":["angular","angularjs","boilerplate","es6","webpack2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiomirandaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-03T20:20:56.000Z","updated_at":"2023-12-25T12:21:42.000Z","dependencies_parsed_at":"2022-08-28T22:45:47.211Z","dependency_job_id":null,"html_url":"https://github.com/fabiomirandaa/boilerplate-angular-es6-webpack2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabiomirandaa/boilerplate-angular-es6-webpack2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomirandaa%2Fboilerplate-angular-es6-webpack2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomirandaa%2Fboilerplate-angular-es6-webpack2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomirandaa%2Fboilerplate-angular-es6-webpack2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomirandaa%2Fboilerplate-angular-es6-webpack2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiomirandaa","download_url":"https://codeload.github.com/fabiomirandaa/boilerplate-angular-es6-webpack2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiomirandaa%2Fboilerplate-angular-es6-webpack2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263339954,"owners_count":23451521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angularjs","boilerplate","es6","webpack2"],"created_at":"2025-03-23T18:40:42.643Z","updated_at":"2025-07-03T14:09:07.046Z","avatar_url":"https://github.com/fabiomirandaa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boilerplate-angular-es6-webpack2\n\nTo install dependencies run:\n`npm i`\n\nTo run the project use:\n\n`npm start`\n\n### To install test dependencies:\n\nUse npm to install Protractor globally with:\n`npm install -g protractor`\nUpdate webdriver-manage(is a helper tool to easily get an instance of a Selenium Server):\n`webdriver-manager update`\nNow start up a server with:\n`webdriver-manager start`\n\n### To run test:\n`cd e2e-tests \u0026\u0026 protractor protractor.conf.js`\n\n## Pattern used in boilerplate\n\n### Controllers \u0026 Services\n\nControllers and Services are write in ES6, example:\n#### Controller\n```\nimport './home.view.html'; // Import view template in the controller making a complete component\n\nexport class HomeController { // Export Controller to use in app.js and router.js\n    constructor($http, $scope) {\n        'ngInject' // Dependencies injection\n\n        this._$http = $http\n        this._$scope = $scope\n    }\n\n}\n```\n#### Service\n```\nexport class UserService { // Export Service to use in app.js or Controllers\n    constructor($http) {\n        'ngInject' // Dependencies injection\n\n        this._$http = $http\n    }\n\n    getUser(id) {\n       return this._$http.get(`/users?id=${id}` )\n   }\n\n}\n```\n\n### Directives\n\nDirectives are a little more complicated because the Angular needs an literal object, different from the controller and service that create constructor function\n\n```\nexport class ExampleDirective { // Export Directive to use in app.js\n  constructor () {\n    'ngInject' // Dependencies injection\n\n    this.templateUrl = 'directives/exampleDirective/example.view.html'\n    this.restrict = 'E'\n    this.controllerAs = 'ctrl'\n    this.scope = {\n      title: '@'\n    }\n\n    this.setTitle()\n  }\n\n  // optional compile function\n  compile (tElement) {\n    tElement.css('position', 'relative')\n  }\n\n  // optional link function\n  link (scope, element) {\n    this.$interval(() =\u003e this.move(element), 1000)\n  }\n\n  // example method\n  setTitle (title) {\n    this.title = title\n  }\n\n  // example method\n  move (element) {\n    element.css('left', (Math.random() * 500) + 'px')\n    element.css('top', (Math.random() * 500) + 'px')\n  }\n\n}\n```\n\n### Docker Support\n\nYou can use it in development or production. There are 2 different `docker-compose.yml` files for\neach environment. When running point to the desired file and have fun.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiomirandaa%2Fboilerplate-angular-es6-webpack2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiomirandaa%2Fboilerplate-angular-es6-webpack2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiomirandaa%2Fboilerplate-angular-es6-webpack2/lists"}