Title: 
new angular development features and improvements with error handling 
webinar by google employees

About Angular: 
Angular is a Typescript-based open-source front-end web application 
platform 
led by the Angular Team at Google and by a community of individuals and 
corporations.

What we’ll cover in this webinar... Any error you can fix after this webinar
1. Angular error handling with latest strategies
2. New tips to write clean and per-formant angular application
3. Improving the testability of the angular app
4. Add caching to APIs and Migrating to PWA
5. State Management in Angular
6. User Activity logging with Azure Application Insights
7. Integrate with any technology

Speaker: 
Ryan Russul who is a speaker and having 8 years of experience in UI 
development and worked 
as senior solution architect, practising code re-usability and enterprise 
practices 
in angular development among all teams who were responsible for angular 
development.

Join in webinar: http://ovpurl.com/c2V5oNgM

<https://lh3.googleusercontent.com/-9lNGYUlUmUU/W81KMsVhMJI/AAAAAAAAAlg/QpmI3_m-nhs-lMsQOKI81-NMYf3dbTIfgCL4CGAYYCw/s1600/angular-webinar-31st.jpg>


On Friday, October 19, 2018 at 9:50:37 PM UTC+5:30, jkn...@highroads.com 
wrote:
>
>
> Hi all, I'm new so greetings! I'm trying to create some dynamic HTML using 
> directives. A simple case worked fine in the case of a single directive but 
> now I'm trying to get a little fancier and I'm not sure how this should 
> work. 
>
> Each of the directives below will need to apply ng-model bindings in the 
> elements they create to whatever controller is assigned to the page they 
> are on.
>
> Looking at the code below, picture an HTML page with some existing 
> content, which then has an element like this defined at the bottom of it:
>
> <div directiveOne></div>
>
> I had directiveOne compile and append additional elements to the page, and 
> that worked. What I want to do now is to have directiveOne compile the same 
> elements to the page, plus an additional one that itself is assigned a 
> directive. When expanded out, it should end up looking something like this 
> (this is just an example):
>
> <div directiveOne>
>     <input type='text'/>
>     <div directiveTwo>
>         <select>
>             <option>Option</option>
>         </select>
>     </div></div>
>
> The reason for the two directives is that there will be some code executed 
> in there to figure out what the elements should actually look like. 
> Ultimately I want directiveOne to make use of a series of little directives 
> and not just directiveTwo.
>
> As of right now, here are the two directives, pared down for (I hope) 
> clarity:
>
> angular.module('myApp').directive('directiveOne', function ($compile) {
>     return {
>         restrict: 'EAC',
>         scope: '=',
>         templateUrl: '/basePage.html',
>         compile: function(element, attr) {
>               var jsonObj = { test: 'TestData' };
>               return function(scope, element, attr) {
>                     var elem = "<div directiveTwo='"+jsonObj+"'></div>";
>                     $compile(elem)(scope);
>                     element.append(elem);
>               }
>         }
>     };});
>
> angular.module('myApp').directive('directiveTwo', function ($compile) {
>     return {
>         restrict: 'EAC',
>         scope: '=',
>         templateUrl: '/subPage.html',
>         compile: function(element, attr) {
>             return function(scope, element, attr) {
>                 // Possibly make changes to subPage.html
>                 // before returning
>                     var elem = "<input ng-model='scopedControllerVar'>";
>                     $compile(elem)(scope);
>                     element.append(elem);
>             }
>         }
>     };});
>
> To a certain degree this works in that if I inspect the HTML afterwards I 
> see this:
>
> <div directiveOne>
>     <div directiveTwo="[object Object]"></div></div>
>
> But the code inside directiveTwo was never executed, and so the div is 
> empty. Is there a way to do this?
>

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

Reply via email to