Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working for me - no deps #46

Closed
crh225 opened this issue Dec 22, 2016 · 15 comments
Closed

not working for me - no deps #46

crh225 opened this issue Dec 22, 2016 · 15 comments

Comments

@crh225
Copy link

crh225 commented Dec 22, 2016

image

I can provide you with what you need to help you debug, I just don't have a plunkr.

@crh225
Copy link
Author

crh225 commented Dec 22, 2016

It turns out it did run, but for some reason, it is including all the soundcloud stuff in the graph mixed with my project.
image

@manekinekko
Copy link
Member

did you try with both "-f" or "-p" flag? Can you post your tsconfig.json and app.component.ts?

@crh225
Copy link
Author

crh225 commented Dec 22, 2016

I will post them Tuesday. I just left for the holidays. Great work by the way!

@manekinekko
Copy link
Member

manekinekko commented Dec 22, 2016 via email

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "sourceMap": true,
    "moduleResolution": "node",
    "skipDefaultLibCheck": true
  },
  "exclude": [
    "./node_modules",
    "./typings/main.d.ts",
    "./typings/main",
   "./typings/custom-signalr.d.ts"
  ],
  "filesGlob": [
    "./client/modules/**/*.ts",
    "./client/platform/**/*.ts",
    "!./node_modules/**",
    "./client/custom-typings.d.ts",
    "./typings/index.d.ts"
  ],
  "compileOnSave": false,
  "buildOnSave": false,
  "awesomeTypescriptLoaderOptions": {
    "useWebpackText": true
  }
}

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

app.component.ts

/*
 * Angular 2 decorators and services
 */
import { Component, ViewEncapsulation, OnInit, ViewContainerRef } from '@angular/core';
import { RouterModule } from '@angular/router';
import { User } from 'oidc-client';
import { LdcLocale, LocaleService, LocalizationService } from './shared/classes/ldcLocale';


import { AuthService, ProfileService } from './shared/services';
import { Title }     from '@angular/platform-browser';
import { Configuration } from './app.constants';
import { UserProfile } from './shared/models/user-profile.model';

/*
 * App Component
 * Top Level Component
 */

@Component({
  selector: 'ldc-app',
  styleUrls: ['./app.component.scss'],
  templateUrl: './app.component.html'
})
export class AppComponent extends LdcLocale implements OnInit {
    loadedUserSub: any;
    isCollapsed: boolean;
    bHasRedirected: boolean = false;
    private _user: User;
    private _viewContainerRef: ViewContainerRef;

    constructor(private authService: AuthService
        , private titleService: Title
        , private configuration: Configuration
        , private viewContainerRef: ViewContainerRef
        , public locale: LocaleService
        , public localization: LocalizationService
    ) {
        super(locale, localization);
        this._viewContainerRef = viewContainerRef;
        
    }
    ngOnInit() {

        this.authService.getUser(); // re-triggers emit user
        this.loadedUserSub = this.authService.userLoadededEvent
            .subscribe(user => {
                this._user = user;
                this.bHasRedirected = false;
            });
        /* this is the angular way to set the title
         * https://angular.io/docs/ts/latest/cookbook/set-document-title.html
         */
        this.titleService.setTitle(this.configuration.SITE_TITLE);
    }

    sidebarChangeEvent(tmp: boolean) {
        this.isCollapsed = tmp;
    }

 

}

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

@manekinekko I tried with both. I posted the files above you requested.

@manekinekko
Copy link
Member

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

@manekinekko,
I have a file called boot.ts (see below). It loades the app module, app component and everything else. When I use this file it doesn't work either.

//Must set Root URL at the very beginning of webpack startup.
declare var __webpack_public_path__: any; // Tell Typescript what the publicPath is.
__webpack_public_path__ = (window as any).atlasResourceBaseUrl;


import 'bootstrap/dist/css/bootstrap.css';
import 'font-awesome/css/font-awesome.css';
import 'ng2-toastr/bundles/ng2-toastr.min.css';
import 'flag-icon-css/css/flag-icon.css';

import './polyfills';
import './vendor';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';

import { AppModule }              from './modules/app.module';

declare var module: any;

if (process.env.ENV === 'Development') {
    // Development

    // Basic hot reloading support. Automatically reloads and restarts the Angular 2 app each time
    // you modify source files. This will not preserve any application state other than the URL.
    
    if (module.hot) {
        module.hot.accept();
    }


} else {
    // Production
    enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);

@manekinekko
Copy link
Member

That's weird, ngd should pick up your app.module from this line:

import { AppModule } from './modules/app.module';

🤔

@manekinekko
Copy link
Member

can you share a repo so we can run some tests ?

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

I based mine off this guy's
https://github.com/asadsahi/AspNetCoreSpa

the loading of app module is the same

@crh225
Copy link
Author

crh225 commented Dec 27, 2016

I also have an issue open with compodoc/compodoc. not sure if it is related, but it could be:
compodoc/compodoc#41

@manekinekko
Copy link
Member

@crh225 I just run ngd -p tsconfig.json on the project https://github.com/asadsahi/AspNetCoreSpa and I got this resulting graph:

image

Can you share your own repo (if it's public). Otherwise we'll try other solutions 😉

@crh225 crh225 closed this as completed Dec 28, 2016
@manekinekko
Copy link
Member

@crh225 what was your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants