Blog data
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
/*
|
||||
Authors : initappz (Rahul Jograna)
|
||||
Website : https://initappz.com/
|
||||
App Name : E-Learning App Template
|
||||
This App Template Source code is licensed as per the
|
||||
terms found in the Website https://initappz.com/license
|
||||
Copyright and Good Faith Purchasers © 2021-present initappz.
|
||||
*/
|
||||
ion-header {
|
||||
--background: white;
|
||||
border-bottom: 0;
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
/*
|
||||
Authors : initappz (Rahul Jograna)
|
||||
Website : https://initappz.com/
|
||||
App Name : E-Learning App Template
|
||||
This App Template Source code is licensed as per the
|
||||
terms found in the Website https://initappz.com/license
|
||||
Copyright and Good Faith Purchasers © 2021-present initappz.
|
||||
*/
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ export class LoginPage implements OnInit {
|
||||
@ViewChild('username') username;
|
||||
@ViewChild('password') password;
|
||||
loginResult: any;
|
||||
blogResult:any;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -22,6 +23,15 @@ export class LoginPage implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
getBlogData(){
|
||||
this.wrenchService.getBlogData().subscribe(
|
||||
blogResult => {
|
||||
this.blogResult = blogResult;
|
||||
console.log("BLOG RETURN->" + this.blogResult);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
loginData: {
|
||||
username: string, password: string, sessionid: string
|
||||
};
|
||||
@@ -36,11 +46,11 @@ export class LoginPage implements OnInit {
|
||||
this.loginResult = loginResult;
|
||||
console.log("INTERNAL RETURN->" + this.loginResult.internal_return);
|
||||
if (loginResult != null && loginResult.internal_return == 100 && this.sessionDataProviderService.ConstructGlobalSessionData(this.loginResult) == true) {
|
||||
this.getBlogData();
|
||||
this.router.navigate(['tabs/tab1']);
|
||||
}
|
||||
}
|
||||
);
|
||||
//this.router.navigate(['tabs/tab1']);
|
||||
}
|
||||
|
||||
onForgot() {
|
||||
|
||||
@@ -25,10 +25,14 @@ export class WrenchService {
|
||||
}
|
||||
|
||||
loginUser(loginData) {
|
||||
|
||||
|
||||
return this.getPostData('userlogin',loginData);
|
||||
}
|
||||
|
||||
getBlogData(){
|
||||
const blogReq=[];
|
||||
return this.getPostData('blogdata',blogReq);
|
||||
//blogdata
|
||||
}
|
||||
/*
|
||||
registerUser(newUserData) {
|
||||
// no session needed - will start the session
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BlogDataService } from './blog-data.service';
|
||||
|
||||
describe('BlogDataService', () => {
|
||||
let service: BlogDataService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(BlogDataService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BlogDataService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
Reference in New Issue
Block a user