Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 25 18:58

    PatrickJS on master

    Update README.md (compare)

  • Sep 24 19:59
    jimzshi closed #252
  • Sep 24 19:58
    jimzshi opened #252
  • Jun 26 20:36
    john-dent commented #88
  • Jun 26 20:35
    john-dent commented #88
  • Mar 19 22:58
    gmostert closed #244
  • Feb 08 06:53
    OliverWall commented #251
  • Dec 14 2018 08:06
    fadehelix commented #251
  • Dec 14 2018 05:03
    thematho commented #251
  • Dec 14 2018 05:01
    thematho commented #209
  • Dec 14 2018 04:59
    thematho commented #209
  • Dec 12 2018 21:57
    fadehelix synchronize #251
  • Nov 04 2018 23:35
    thematho synchronize #224
  • Oct 26 2018 16:00
    Stephanemw commented #248
  • Oct 26 2018 00:16
    thematho synchronize #224
  • Oct 16 2018 11:11
    caprica-Six commented #148
  • Oct 16 2018 11:11
    caprica-Six commented #148
  • Oct 16 2018 11:10
    caprica-Six commented #148
  • Oct 16 2018 11:08
    caprica-Six commented #148
  • Oct 16 2018 11:07
    caprica-Six commented #148
T-G-G
@T-G-G
    new webpack.optimize.CommonsChunkPlugin({
      name: 'vendor',
      minChunks: function (module, count) {
        //console.log(module.rawRequest);
        console.log(module.resource);
        return module.resource && module.resource.indexOf(path.resolve(__dirname, 'client')) === -1;
      }
    })
If you look at the logs of that shows all kinda es6 and 7 stuff being webpacked and the bundles seem comparatively huge compared to vanilla angular stuff.
T-G-G
@T-G-G
Also found in the vendor.bundle.js.map, its all the core-js modules but don't know what it would have es7 stuff loaded when i changed the .bablerc to have just es2015
Sergey Protko
@fesor
@T-G-G all this shim stuff is added in gulpfile.babel.js
you could turn it off and only use polyfils that you need
T-G-G
@T-G-G
Again prob quiet noobish but how would I do that all i can see in the gulpfile.babel.js is 'babel-polyfill' relating to babel in anyway, how would I make it so that it only loads those that are required or even only the es6 stuff at least?
Sergey Protko
@fesor

is 'babel-polyfill' relating to babel in anyway

this is ALL polyfils, you can import only that you need

T-G-G
@T-G-G
@fesor Cheers!!! playing with the different pre-set's now don't suppose anyone knows a lightweight es2015 as the babel-preset-es2015 is actually bigger weirdly
Sergey Protko
@fesor
@T-G-G AngularClass/NG6-starter#143
T-G-G
@T-G-G
@fesor You sir are a legend!!
Arturo Romero
@arturoromeroslc

Hello Friends!

I am looking for some help. I am trying to import rx-angular into my application by add the following in home.js:

import angular from 'angular';
import homeComponent from './home.component';
import rx from 'rx-angular';

let homeModule = angular.module('home', [
    'firebase',
    rx
])

.component('home', homeComponent)

.name;

export default homeModule;

I am however getting this error from webpack, do ya'll any idea of what I am doing worng. Thanks for the help.

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.components due to:
Error: [$injector:modulerr] Failed to instantiate module home due to:
Error: [$injector:modulerr] Failed to instantiate module {"internals":{},"config":{"longStackSupport":false,"useNativeEvents":false},"helpers":{},"doneEnumerator":{"done":true},"ReactiveTest":{"created":100,"subscribed":200,"disposed":1000}} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object
proJS
@dssorokin

Hi guys. My problem is that ui-router events $stateChangeStart and $stateChangeSuccess doesn't work in this template. I put this code

$rootScope.$on('$stateChangeStart', function(){
console.log('start');
})
$rootScope.$on('$stateChangeSuccess', function(){
console.log('success');
})
at run function in app.js file. When i change the state nothing happend.

Sergey Protko
@fesor
@dssorokin please read documentation for uiRouter 1.0beta
@dssorokin i didn't tried uiRouter 1.0 yet so can't help you with that. I only know that this is not starter's problem. You could also downgrade to latest stable uiRouter release.
proJS
@dssorokin
@fesor thank you. It turned out that ui-routes events has been deprecated in new version.
Ramy Tamer
@ramytamer
Hi guys, could you please tell me how to import jquery-ui in my project along with all the required css and images from the library?
Kévin
@kevincaradant

Hi @arturoromeroslc

Hello Friends!

I am looking for some help. I am trying to import rx-angular into my application by add the following in home.js:

import angular from 'angular';
import homeComponent from './home.component';
import rx from 'rx-angular';

let homeModule = angular.module('home', [
    'firebase',
    rx
])

.component('home', homeComponent)

.name;

export default homeModule;

I am however getting this error from webpack, do ya'll any idea of what I am doing worng. Thanks for the help.

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.components due to:
Error: [$injector:modulerr] Failed to instantiate module home due to:
Error: [$injector:modulerr] Failed to instantiate module {"internals":{},"config":{"longStackSupport":false,"useNativeEvents":false},"helpers":{},"doneEnumerator":{"done":true},"ReactiveTest":{"created":100,"subscribed":200,"disposed":1000}} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object

Did you find the solution ? i get exactly the same problem :/ . Thank you

Ramy Tamer
@ramytamer
@kevincaradant try to include rx in home module as a string 'rx'
let homeModule = angular.module('home', [
    'firebase',
    'rx'
])
Kévin
@kevincaradant
yes thank you @ramytamer :)
Ramy Tamer
@ramytamer
Can anyone please tell me what is happening here ?
issue: http://ramytamer.com/angular-ng6-starter.mp4
solution: http://ramytamer.com/angular-ng6-starter-resolve.mp4
Josoroma
@josoroma

Hi Hackers!

I am trying to know where is the right place to properly import and pass as a dependency the angular material package, I just found this:

AngularClass/NG6-starter@ced8cff

so app.js is the right place to import this module?

Josoroma
@josoroma
Hi again! I have a roadblock trying to separate the config file into a separate file:
angular.module('assessments', [
  uiRouter,
  Common,
  Components
])
.config(($locationProvider) => {
  "ngInject";
  // @see: https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions
  // #how-to-configure-your-server-to-work-with-html5mode
  $locationProvider.html5Mode(true).hashPrefix('!');
})
Josoroma
@josoroma
I got it:
import angular from 'angular';
import uiRouter from 'angular-ui-router';

import HomeComponent from './home.component';
import HomeConfig from './home.config';

let homeModule = angular.module('home', [
  uiRouter
])

.config(HomeConfig)

.component('home', HomeComponent)

.name;

export default homeModule;
let homeConfig = function($urlRouterProvider, $stateProvider) {
  "ngInject";

  $urlRouterProvider.otherwise('/');

  $stateProvider
    .state('home', {
      url: '/',
      component: 'home'
    });
};

export default homeConfig;
Victor Nascimento
@vjoao
Hello guys
I'm trying to implement a route resolve
but I cant access the resolved variable on controllers constructor
im trying this:
.config(($stateProvider) => {
  "ngInject";
  $stateProvider
    .state('welcome', {
      url: '/',
      component: 'welcome',
      resolve: {
        'currentAuth': function (Auth) {
          "ngInject";
          return Auth.$waitForSignIn();
        }
      }
    });
})
and trying to access it like this:
class WelcomeController {
  constructor(currentAuth) {
    "ngInject";

    console.log(currentAuth);
    this.name = 'welcome';
  }
}
Sergey Protko
@fesor
@vjoao it this component controller or "global" controller?
Victor Nascimento
@vjoao
component controller
Sergey Protko
@fesor
then you should pass resolved value to component binding.
Victor Nascimento
@vjoao
and the config belogns to the welcome component js file
Sergey Protko
@fesor
.component('myComponent', {
    bindings: { currentAuth: '<' }
});
something like that. I didn't use uiRouter for a while
Victor Nascimento
@vjoao
thanks, it worked =)
This changed a bit the way I was used to do
Sergey Protko
@fesor
well... this is just a separation of concerns. Components responsible only for UI, not for state. You get state from within resolvers and pass it via bindings to components.
state changed - resolver updates value.
ideally
Victor Nascimento
@vjoao
really cool =)
Josoroma
@josoroma

Hi!

what is the best way to add a show page or component to display the id of a record?

Do I need to create another component inside my current component and add a route to the subcomponent for show, edit, ect?
anthony olivence
@tucaza_twitter
Anyone run into an issue with karma not finding npm or bower imports outside of app.js, such as in a component.js?
Bnaya Peretz
@Bnaya
I see that each component have its own module
Is it considered as best practise?
Demetri Ganoff
@dganoff
Has anyone tried placing .spec.js files outside the client/app folder? I'm trying to convert an existing project to use a similar webpack/testing setup as NG6-starter, but having issues getting the tests to run
I have my source files in src/app and my test files in test/unit.
I'm wondering if I need to add something to my spec.bundle.js file or the karma config so that it loads the correct source and test files
I keep getting this terminal error:
forEach@webpack:///~/angular/angular.js:321:0 <- spec.bundle.js:390:25
loadModules@webpack:///~/angular/angular.js:4601:0 <- spec.bundle.js:4670:13
createInjector@webpack:///~/angular/angular.js:4523:0 <- spec.bundle.js:4592:31
workFn@webpack:///~/angular-mocks/angular-mocks.js:3074:0 <- spec.bundle.js:34916:61
inject@webpack:///~/angular-mocks/angular-mocks.js:3054:0 <- spec.bundle.js:34896:47
webpack:///src/app/app.config.spec.js:9:0 <- spec.bundle.js:35004:12
loaded@http://localhost:9876/context.js:151:17
webpack:///~/angular/angular.js:4641:0 <- spec.bundle.js:4710:54