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

GET http://localhost:4200/app/main.ts 404 (Not Found) #11

Open
amitkaira87 opened this issue Jan 14, 2017 · 0 comments
Open

GET http://localhost:4200/app/main.ts 404 (Not Found) #11

amitkaira87 opened this issue Jan 14, 2017 · 0 comments

Comments

@amitkaira87
Copy link

amitkaira87 commented Jan 14, 2017

I am using angular CLI and ATOM editor for coding.

I followed your tutorial. My main.ts code is ad follow

import { platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
import { AppModule } from './app/app.module';
import {ApiConfig} from './app/api.service';
import {AppComponent} from './app/app.component';


if (environment.production) {
  enableProdMode();
}


export function initApp(apiUrl: string, apiToken:string, apiSession:string){
// make the config ref to start the new running program
  let apiConfig = new ApiConfig();
  apiConfig.apiUrl = apiUrl;
  apiConfig.apiToken = apiToken;
  apiConfig.apiSession = apiSession;

  console.log("Inside the function  api_url :"+apiUrl+" api_token : "+apiToken+"--- sessiontoken : "+apiSession);
}


bootstrap(AppComponent, [
      provide("api.config", {useValue: apiConfig})
  ]); 

 platformBrowserDynamic().bootstrapModule(AppModule);

But i am not able to import


bootstrap(AppComponent, [
      provide("api.config", {useValue: apiConfig})
 ]);

Its not in my @angular package.


My Issue is:
I want to pass accesstoken and sessiontoken to angular app. In the first component (App Component) i want to check (by server api) if user is authorised to access the app.

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

1 participant