I know if i have a exported service,
import { Injectable } from '@angular/core';
@Injectable()
export class StudentService {
}
I can import this service into my component:
import { StudentService } from "./student-.service";
But, if my service is not a exported class, how do I import this unexported service into angular 2 component?
(function() {
"use strict"
class StudentService {
}
angular.module('test').service('StudentService');
})();
My component and service are not within the same folder/module.
My component is inside: AFolder/Student/student.component.ts
My service is inside: BFolder/Shared/student.service.js
AFolder and BFolder both are under MainFolder.
MainFolder
-AFolder
-BFolder
I cannot find the solution for my question both from Google and StackOverflow. Please advise. Thanks.