0

Client-side:

when("/page/:id", {
    templateUrl: "partials/note-tpl.html",
    controller : "AppPageController"
 });

$locationProvider.html5Mode( true );

Html:

<a ng-href="/page/{{Page._id}}">{{Page.name}}</a>

Server-side:

app.use("/page/:id", function( req, res ) {
 res.send( req.params )
});

As a result I get empty page or just object with id. What's wrong? Angular does not load note-tpl.html template

2 Answers 2

0

Might be because of the conflict from express templating engine vs angular.

What view engine are you using?

The use of {{}} might be handled by express and not angular. You can either change the server view engine to use other keywords.

Sign up to request clarification or add additional context in comments.

Comments

0

Sounds like your server is not responding with note-tpl.html.

Are you sure your partials exist at that path? Have you used express.static?

Can help more with any error messages you get.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.