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
| import angular from 'angular'; | |
| import HomeComponent from './home/home.component'; | |
| import homeTemplate from './home/home.html'; | |
| export default angular | |
| .module('app.components', []) | |
| .controller('HomeComponent', HomeComponent) | |
| .config(($stateProvider, $urlRouterProvider) => { | |
| 'ngInject'; | |
| $stateProvider |
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
| import angular from 'angular'; | |
| import NavbarComponent from './navbar/navbar.component'; | |
| export default angular | |
| .module('app.common', []) | |
| .directive('navbar', () => NavbarComponent); |
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
| import 'babel-polyfill'; | |
| import angular from 'angular'; | |
| import CommonModule from './common/common.module'; | |
| import ComponentModule from './components/components.module'; | |
| angular.module('app', [ | |
| 'ui.router', | |
| 'app.common', | |
| 'app.components', | |
| ]); |
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
| import angular from 'angular'; | |
| import NavbarComponent from './navbar/navbar.component'; | |
| export default angular | |
| .module('app.common', []) | |
| .component('navbar', NavbarComponent); |
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
| import template from './home.html'; | |
| class HomeController { | |
| constructor() { | |
| this.title = 'Hello from AngularJS'; | |
| } | |
| } | |
| export default { | |
| template, |
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
| import angular from 'angular'; | |
| import Home from './home/home.component'; | |
| export default angular | |
| .module('app.components', []) | |
| .component('home', Home) | |
| .config(($stateProvider, $urlRouterProvider) => { | |
| 'ngInject'; | |
| $stateProvider | |
| .state('home', { url: '/', component: 'home' }); |
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
| { | |
| "name": "angular-demo", | |
| "version": "5.2.9", | |
| "scripts": { | |
| "build": "webpack", | |
| "serve": "webpack && webpack-dev-server --hot --inline --open" | |
| }, | |
| "babel": { | |
| "presets": [ "env" ], | |
| "plugins": [ |
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
| import path from 'path'; | |
| import webpack from 'webpack'; | |
| import ExtractTextPlugin from 'extract-text-webpack-plugin'; | |
| export default { | |
| devtool: 'inline-source-map', | |
| entry: { | |
| 'js/vendor': [ | |
| '@angular/common', | |
| '@angular/compiler', |
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 lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>Angular Demo</title> | |
| </head> | |
| <body> | |
| <my-app></my-app> | |
| <script src="dist/js/vendor.js"></script> |