Posts

Showing posts with the label angular6

How can I do to use Angular 5/6 for frontend and Codeigniter 3 for backend in the web same app?

How can I do to use Angular 5/6 for frontend and Codeigniter 3 for backend in the web same app? I want to buid a web using Angular 6 for frontend and Codeigniter 3 for backend . The problem is that I don't know how to combine the two, and all the tutorials I looked were using AngularJS which is the version 1 whereas i'm using version 6 , and it didn't really work. I am looking for something like JavaScript & CSS Scaffolding using Angular 6 (and not AngularJS ) with Codeigniter 3 What I want is to set the view to be the Angular app and let Codeigniter do the routing and handle the server Can anyone help me?? 1 Answer 1 You can create APi's in codeigniter and then implement those in Angular or any other front end language. I forgot to tell I am new to this, so please can you tell me exactly how to do that or redirect me to a place where I can find ...

“fake path” issue using multer+angular 6

“fake path” issue using multer+angular 6 I spend the last 3 days to fix the problem , but i didnt figure out yet the issue. Angular CLI: 6.0.8 Node: 8.11.2 OS: win32 x64 Angular: 6.0.6 multer. 1.3.1 my code at "childApi" using multer staff : var store = multer.diskStorage({ destination: function (req, file, cb) { cb(null, './uploads'); }, filename: function (req, file, cb) { cb(null, Date.now() + '.' + file.originalname); } }); var upload = multer({ storage: store , }).single('file'); router.post('/upload', function (req, res, next) { upload(req, res, function (err) { if (err) { return console.log ('not working well') } //do all database record saving activity return res.json({ originalname: req.file.originalname, uploadname: req.file.filename }); }); }); my code at "add-child" component using simple code : import { Component, OnInit, Injec...