Hi Mike - I know this thread is old, but I can find any other examples 
online.

I am trying to get this to work and am not able to use your example 
successfully - please could you post a simple plunker demonstrating this.

Thanks,
Shantanu

On Sunday, April 15, 2012 3:45:56 PM UTC+1, Mike Kotsur wrote:
>
> Hi Andrew!
> Yes, it's possible. First you need to configure your module:
>
>     angular.module('MainModule', []).config(function($locationProvider, 
> $routeProvider) {
>         $locationProvider.hashPrefix("!");
>         $locationProvider.html5Mode(false);
>         $routeProvider.when('/', {template: './js/templates/index.html', 
> controller:HelloWorldCtrl});
>         $routeProvider.when('/second', {template: 
> './js/templates/second.html'});
>     });
>
> Then in your *real* index HTML you need to specify templates:
>
> <script type="text/ng-template" src="./js/templates/index.html"></script>
> <script type="text/ng-template" src="./js/templates/second.html"></script>
>
> (You also can inline them, but I prefer to keep in separate files).
>
> And don't forget to create a placeholder for the result of your template's 
> rendering.
> <div class="ng-view"></div>
>
> Try, that should work.
>
> Mykhailo
>
> On Sunday, 15 April 2012 16:17:40 UTC+2, [email protected] wrote:
>>
>> For really offline web page (without web server) i would like to use 
>> routing in angularJS. In route definition there is template parameter to 
>> provide relative path to partial, but in this case loading not work 
>> (security, access to files).
>>
>> Is it possible to define all "partials" in one html file and use routes 
>> and ng:view for switching views?
>>
>> Thank you for an answer and great work on angularJS, Andrew
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to