You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
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.
The text was updated successfully, but these errors were encountered:
I am using angular CLI and ATOM editor for coding.
I followed your tutorial. My main.ts code is ad follow
But i am not able to import
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.
The text was updated successfully, but these errors were encountered: