Guest User

Untitled

a guest
Dec 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. // require('./app.scss');
  2.  
  3. // import AppController from './app.controller';
  4.  
  5. function AppDirective(): ng.IDirective {
  6. return {
  7. restrict: 'E',
  8. scope: {},
  9. controllerAs: 'vm',
  10. // controller: AppController,
  11. controller: () => {},
  12. // template: require('./app.html')
  13. template: '<div>this is a test</div>'
  14. }
  15. }
  16.  
  17. angular
  18. .module('myApp')
  19. .directive('appDirective', AppDirective);
  20.  
  21. export default class AppController {
  22.  
  23. public static $inject = ['$scope'];
  24.  
  25. constructor(private $scope) {
  26.  
  27. }
  28. }
  29.  
  30. <div>
  31. THIS IS A TEST, REMAIN CALM
  32. </div>
  33.  
  34. Uncaught TypeError: Cannot read property 'call' of undefined__webpack_require__ @ bootstrap 9163605…:50
  35. webpackJsonp.152 @ app.ts:2__webpack_require__ @ bootstrap 9163605…:50
  36. webpackJsonp.153 @ main.browser.ts:1__webpack_require__ @ bootstrap 9163605…:50
  37. webpackJsonp.0 @ main.bundle.js:7__webpack_require__ @ bootstrap 9163605…:50
  38.  
  39. modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  40.  
  41. {
  42. test: /.ts$/,
  43. loader: 'awesome-typescript-loader',
  44. exclude: [/.(spec|e2e).ts$/]
  45. },
  46.  
  47. {
  48. test: /.scss$/,
  49. loader: 'style-loader!css-loader!sass-loader'
  50. },
  51.  
  52. {
  53. test: /.html$/,
  54. loader: 'raw-loader',
  55. exclude: [helpers.root('src/index.html')]
  56. },
  57.  
  58. new webpack.optimize.CommonsChunkPlugin({
  59. name: helpers.reverse(['polyfills', 'vendor', 'main']),
  60. // minChunks: Infinity
  61. }),
  62.  
  63. new webpack.optimize.CommonsChunkPlugin({
  64. names: ['polyfills', 'vendor', 'main'],
  65. minChunks: 2
  66. }),
  67.  
  68. new webpack.optimize.CommonsChunkPlugin({
  69. names: ['polyfills', 'vendor', 'main'],
  70. minChunks: 2
  71. }),
Add Comment
Please, Sign In to add comment