Hi Doug,
Please take a look
at
http://stackoverflow.com/questions/12885422/angular-js-2-applications-on-the-same-page-only-1-should-affect-browsers-loca
and Working Example : http://jsfiddle.net/2yUAD/1/
Thanks
K M Siva Kumar
On Thursday, October 8, 2015 at 4:56:04 AM UTC+5:30, Doug Briere wrote:
>
>
> I have a working route defined as follows (names changed):
>
> angular.module('myParentApp', [
> 'ngRoute'
> ])
>
> .config(['$routeProvider',function($routeProvider) {
> $routeProvider
> .when('/view1', {
> templateUrl: 'views/view1.html',
> controller: 'View1Controller'
> })
>
>
> Then I have my new app which, uses the above parent as a dependency ,
> adding a second route for view2 (doesnt work)
>
> angular.module('newChildApp', [
> 'myParentApp',
> 'ngRoute'
> ])
>
>
> .config(['$routeProvider', function($routeProvider) {
> $routeProvider
>
>
> .when('/view2', {
> templateUrl: 'views/view2.html',
> controller: 'View1Controller'
> });
> }]);
>
>
> I have included a script tag for the child app, but I cant seem to get
> view2 to display (if I move to myParentApp it works).
>
> Questions:
>
> 1. When creating newChildApp is ngRoute redundant since will it be
> inherited from myParentApp ?
> 2. Can I create routes in this fashion? or is the view2 route not working
> being out of scope?
> 3. is using the <script tag to import the js for the child app not enough ?
>
> Thank you
>
>
>
--
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.