You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far it is going well, thanks for the work on this! Just wondering how to setup a "clean" url.
For example I did it that way for a home page.
pages/1 will show the Page model
/home will show pages/1 since I specified in the Rail routes.rb to
match '/home', to: 'pages#show', :id => '1'
But I also had to go into the angular pages_controller.js.coffee to make a controller for this
PagesHome = ($scope, $location, $routeParams, Page) ->
Page.get
id: 1
, (page) -> @original = page
$scope.page = new Page(@original)
PagesHome.$inject = ['$scope', '$location', '$routeParams', 'Page'];
But to do this for the About page and the Contact page seem overkill. Is there a way to do this more dynamically.
Sorry if I am missing the obvious.
Al
The text was updated successfully, but these errors were encountered:
So far it is going well, thanks for the work on this! Just wondering how to setup a "clean" url.
For example I did it that way for a home page.
pages/1 will show the Page model
/home will show pages/1 since I specified in the Rail routes.rb to
match '/home', to: 'pages#show', :id => '1'
But I also had to go into the angular pages_controller.js.coffee to make a controller for this
PagesHome = ($scope, $location, $routeParams, Page) ->
Page.get
id: 1
, (page) ->
@original = page
$scope.page = new Page(@original)
PagesHome.$inject = ['$scope', '$location', '$routeParams', 'Page'];
But to do this for the About page and the Contact page seem overkill. Is there a way to do this more dynamically.
Sorry if I am missing the obvious.
Al
The text was updated successfully, but these errors were encountered: