javascript - Localised AngularJS Routes -


I have done backbone js coding and have successfully constructed large projects using backbones and AMD.

Now I am watching using AngularJS and have done an implementation with AMD and so far have created some controllers and services so far so that they are very comfortable.

The only thing is that we create many applications, which require localization for different areas. For this reason I have successfully configured the Konari translation and it works fine.

does not support the translation of the angle is the creation of the local URL path which I can easily achieve in backbones.

Does anyone point me in the right direction for any article or post, how it is to do with AngularJS but trawling through Google but can not find anything!

So, this is the best solution or not, I interpret an approach that we took When it came to the dumb corner app, the required routes were defined on the backend. So the URL the URL that is generated when running is unknown in our app, what we do:

  • Call the service defining our app url
  • Confirm Recover URL
  • Call $ route.reload () Essentially restart (this does not actually restart the application, But bus runs the application again)

    We then define the routes based on the attributes of the app Such as: http://foo.bar/product/:slug . So if a user has gone to http://foo.bar/product/foobar , then it is not known whether foobar exists or not. This allowed us to dump the UI and define routes on the backend; Therefore ...

    1. To establish base routes, such as / product /: slug , / page /: slug etc. ..
    2. Make a factory that has a boolean variable that the app loaded localization data; If this is incorrect then your product , page , etc. ... the controller will only silently stop it on its init
    3. Your Base Controller loads your localization data, validates it, etc. ... Once you are happy, you run $ route.reload () and this time the factory flag
    4. Your product , page , etc. ... the controllers will be called again, but the factory flag is true. So, they can now refer to your loaded localization data
    5. Benefits

      Hope this does not seem painful, it can is an elegant solution and works really well just to be sure that you have a good submissive loader.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -