Comments (4)
You should create a backend to provide an API and use AngularJS service + connect it to the routes using the resolve property. This is more question for stackoverflow instead of here.
from angular-client-side-auth.
oups i probably phrased that question wrong... I am actually using angular-client-side-auth for my project... what i'm confused is why does /users give me the users in JSON format but the ones i declared in express server.js
app.get('/api/1/messages', function(req, res) { ...
...
...
those will result in Angular giving me a 404
from angular-client-side-auth.
[SOLVED]
found this in route.js
// User resource
{
path: '/users',
httpMethod: 'GET',
middleware: [UserCtrl.index],
accessLevel: accessLevels.admin
},
so i'm basically creating new resources/models/controllers to satisfy my API needs :)
from angular-client-side-auth.
Yep! You have to declare the the actual URL route on the server-side. If not it will be caught by a catchall route which will "delegate" the routing to the client-side Angular routing (from a server-side perspective it will just return the index site, which will cause Angular to check the route provided when it has been loaded). It works like this because I wanted pretty, "html5mode" url's on the client side :)
from angular-client-side-auth.
Related Issues (20)
- Replace $cookieStore to $cookies HOT 1
- I am new to npm and angular, I tried on windows 8.1, i was able to complete npm install, but npm start gave error HOT 1
- Server depends on a file located in the client directory HOT 1
- book mark HOT 2
- npm install throwing me to include npm-debug.log
- react js issue
- npm run build error HOT 3
- Can't start the "npm run dev" on my ubuntu 17.10 Laravel 5.5
- I am new with Node and it gives me error whenever i run npm start command.Can anyone please help me....
- i have error when i write npm start
- I'm new with Node
- Unresolved variable or type routingConfig HOT 2
- Google Logout HOT 2
- How about using JWT instead of cookies HOT 5
- "data.access" in toState is always false HOT 2
- Integration with Django HOT 3
- Social sites login
- Question about passing the user to HTTP GET * HOT 1
- Use ng-if instead CSS HOT 5
- any sample with asp.net mvc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-client-side-auth.