marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

versioning of views? #140

Closed jasoncavaliere closed 9 years ago

jasoncavaliere commented 9 years ago

I'm looking for a way to allow caching of an HTML view but force an update on refresh. I tried adding a query string parameter to my view names, but the angularAMD.route() method seems to ignore it.

I have a route table in a requireJS module that looks like this:

define(['angularAMD'], function (angularAMD) { 'use strict'; var viewVersion = '?v=1.4'; var routes = {} routes.authenticated ={}; routes.unauthenticated={}; routes.unauthenticated.home= angularAMD.route({ url: '/home', templateUrl: 'views/home.html' + viewVersion, controller: 'homeController', controllerUrl: 'controllers/home' }); /// Other routes here.... return routes; });

Is there a way to accomplish what I'm trying to do here?

marcoslin commented 9 years ago

angularAMD.route was designed to be used by ngRoute or ui-router. It is not clear which router you are using here.

jasoncavaliere commented 9 years ago

I'm using ui-router.

Date: Mon, 25 May 2015 13:27:32 -0700 From: notifications@github.com To: angularAMD@noreply.github.com CC: jasoncavaliere@hotmail.com Subject: Re: [angularAMD] versioning of views? (#140)

angularAMD.route was designed to be used by ngRoute or ui-router. It is not clear which router you are using here.

— Reply to this email directly or view it on GitHub.

marcoslin commented 9 years ago

That should work then. Have you checked your developer console and confirmed that the url is indeed not being passed? Does the same code works without angularAMD.route?

marcoslin commented 9 years ago

Closed without further comment from user.